Click here to Skip to main content
15,924,901 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Debugging DLL problem Pin
Chris Losinger21-Nov-05 9:27
professionalChris Losinger21-Nov-05 9:27 
GeneralRe: Debugging DLL problem Pin
Bob Stanneveld21-Nov-05 9:38
Bob Stanneveld21-Nov-05 9:38 
QuestionLRU & FIFO Pin
Jeannie Brown21-Nov-05 6:01
Jeannie Brown21-Nov-05 6:01 
AnswerRe: LRU & FIFO Pin
toxcct21-Nov-05 6:21
toxcct21-Nov-05 6:21 
QuestionCan I call a DLL which was created from VB.net? Pin
ATC21-Nov-05 5:01
ATC21-Nov-05 5:01 
AnswerRe: Can I call a DLL which was created from VB.net? Pin
toxcct21-Nov-05 5:08
toxcct21-Nov-05 5:08 
GeneralRe: Can I call a DLL which was created from VB.net? Pin
ATC21-Nov-05 7:36
ATC21-Nov-05 7:36 
AnswerRe: Can I call a DLL which was created from VB.net? Pin
Mike Dimmick21-Nov-05 7:20
Mike Dimmick21-Nov-05 7:20 
VB.NET code generates a DLL, but it doesn't use the entry-point format that native code uses. You can't therefore use static linking to link to VB.NET code, nor dynamic linking through LoadLibrary and GetProcAddress.

However, you can use COM to call suitable VB.NET code. The code must be implemented (if I remember correctly) as a class instance method (not Shared or in a Module), must be Public, and the class must either have no constructor or a default constructor (a Sub New which takes no parameters).

To do this you need to register the .NET assembly for COM Interop. The .NET Framework includes the tool regasm for this purpose. regasm can be made to also generate a type library by passing the /tlb option. You can then use a #import directive in your C++ code to get the compiler to generate the necessary code to call the VB.NET code.

For the Framework to find the assembly at runtime, you must either: generate a strong name for the assembly and place it in the global assembly cache, or use the /codebase switch to regasm.

Stability. What an interesting concept. -- Chris Maunder
GeneralRe: Can I call a DLL which was created from VB.net? Pin
ATC21-Nov-05 7:31
ATC21-Nov-05 7:31 
Questioncreating a Doc/View App as a dll for a non MFC exe Pin
mintguy21-Nov-05 5:01
mintguy21-Nov-05 5:01 
QuestionBOOST uBLAS (Basic Linear Algebra) Pin
Abbas_Riazi21-Nov-05 3:50
professionalAbbas_Riazi21-Nov-05 3:50 
AnswerRe: BOOST uBLAS (Basic Linear Algebra) Pin
toxcct21-Nov-05 4:25
toxcct21-Nov-05 4:25 
QuestionApplication Data Folder Pin
CosminU21-Nov-05 3:49
CosminU21-Nov-05 3:49 
AnswerRe: Application Data Folder Pin
toxcct21-Nov-05 4:10
toxcct21-Nov-05 4:10 
GeneralOT Pin
Eytukan21-Nov-05 4:18
Eytukan21-Nov-05 4:18 
GeneralRe: OT Pin
toxcct21-Nov-05 4:26
toxcct21-Nov-05 4:26 
QuestionProblem with CCombo control usage Pin
asifrogers21-Nov-05 3:26
asifrogers21-Nov-05 3:26 
AnswerRe: Problem with CCombo control usage Pin
David Crow21-Nov-05 4:38
David Crow21-Nov-05 4:38 
GeneralRe: Problem with CCombo control usage Pin
asifrogers21-Nov-05 18:17
asifrogers21-Nov-05 18:17 
GeneralRe: Problem with CCombo control usage Pin
David Crow22-Nov-05 3:09
David Crow22-Nov-05 3:09 
QuestionString concatenation in vc++.net Pin
salaikumar21-Nov-05 2:10
salaikumar21-Nov-05 2:10 
AnswerRe: String concatenation in vc++.net Pin
Russell'21-Nov-05 2:48
Russell'21-Nov-05 2:48 
GeneralRe: String concatenation in vc++.net Pin
salaikumar21-Nov-05 5:07
salaikumar21-Nov-05 5:07 
GeneralRe: String concatenation in vc++.net Pin
BambooMoon21-Nov-05 5:48
BambooMoon21-Nov-05 5:48 
GeneralRe: String concatenation in vc++.net Pin
James R. Twine21-Nov-05 5:51
James R. Twine21-Nov-05 5:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.