![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Need to access VC++ dll in VB.net project Hi, I have written a small VC++ program to decompress the incoming message & return the new message length. Compiled that into a dll & referred in a vb.net project. In .net project, I am able to access the function which I declared in dll. Compilation also done perfectly. But when execution comes to that dll line, error "The source code is available" is thrown. In the dll project, the function needs to be accessed is declared as extern "C" __declspec(dllexport)int GetFullMsg(lzo_byte* in, lzo_byte* out, int iCompLen, lzo_uint* new_len ); In .net project , I have declared as Private Declare Function GetFullMsg Lib "E:\Valli\ActiveTraderDotnet\SOURCE\ATActiveComponents\Bin\BCMDecompression.DLL" (ByVal in1 As Char, ByVal out As Char, ByVal iCompLen As Integer, ByVal new_len As UInteger) As Integer the line which throws error is - GetFullMsg(indata, outdata, CompLen, new_len) Can anyone help me to fix this error? Is the declarations are wrong? Thanks in advance Valli |
My System Specs![]() |
| | #2 (permalink) |
| | RE: Need to access VC++ dll in VB.net project "Valli" wrote: Quote: > Hi, > > I have written a small VC++ program to decompress the incoming message & return the new message length. > Compiled that into a dll & referred in a vb.net project. > > In .net project, I am able to access the function which I declared in dll. Compilation also done perfectly. But when execution comes to that dll line, error "The source code is available" is thrown. > > In the dll project, the function needs to be accessed is declared as > extern "C" __declspec(dllexport)int GetFullMsg(lzo_byte* in, lzo_byte* out, int iCompLen, lzo_uint* new_len ); > > In .net project , I have declared as > Private Declare Function GetFullMsg Lib "E:\Valli\ActiveTraderDotnet\SOURCE\ATActiveComponents\Bin\BCMDecompression.DLL" (ByVal in1 As Char, ByVal out As Char, ByVal iCompLen As Integer, ByVal new_len As UInteger) As Integer > > the line which throws error is - GetFullMsg(indata, outdata, CompLen, new_len) > > Can anyone help me to fix this error? Is the declarations are wrong? > > Thanks in advance > Valli > them. What are the definitions of lzo_byte and lzo_uint? One normall would not redefine the standard byte and uint unless there was something changed. Mike |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Hp m9040n project | General Discussion | |||
| Cannot create new project | .NET General | |||
| In any project, Can't we refer classes directly, (without addingphysically in the project)? | .NET General | |||
| Microsoft Advances Its Project Management Technology and the Project Management Profession | Vista News | |||