Fog Creek Software
Discussion Board

Welcome! and rules

Joel on Software

Calling VC++ From VB.NET

I have been searching google, google groups and MSDN but haven't found any simple examples yet.  Suggestions and/or URLs would be appreciated!

I need to write some ISO C++ functions to verify data streams.  (It is expected these will also eventually be run in Linux.)  The application also needs a management GUI.  For Windows I plan to write the GUI in VB .NET 2003.

How do I call C++ from VB.NET?  I'm trying to start small:

bool AlwaysReturnsTrue(void)

and work up to:

bool StreamIsValid(IN ByteArray, IN Length, OUT ErrorMessage, OUT ErrorByte)

I'm uncertain about memory issues:  Who allocates, etc.  I'm also unclear
about internalization of the error messages.


Mark Jerde
Monday, February 28, 2005

I'm not sure if you can - you can from C# though - or should I say you can write unmanaged code in C#....  I've never used VB - does it support pinvoke, etc.. ?

Monday, February 28, 2005

try this:

Monday, February 28, 2005

*  Recent Topics

*  Fog Creek Home