Click here to Skip to main content
15,903,856 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to take screenshots Pin
Anonymous31-Mar-04 7:56
Anonymous31-Mar-04 7:56 
AnswerRe: How to take screenshots Pin
David Crow31-Mar-04 2:11
David Crow31-Mar-04 2:11 
GeneralRe: How to take screenshots Pin
Anonymous31-Mar-04 7:58
Anonymous31-Mar-04 7:58 
GeneralConvert C++ DLL to VB.net Help Pin
nelsonbd30-Mar-04 22:53
nelsonbd30-Mar-04 22:53 
GeneralRe: Convert C++ DLL to VB.net Help Pin
Antony M Kancidrowski31-Mar-04 0:38
Antony M Kancidrowski31-Mar-04 0:38 
GeneralRe: Convert C++ DLL to VB.net Help Pin
Alexander M.,31-Mar-04 2:04
Alexander M.,31-Mar-04 2:04 
GeneralRe: Convert C++ DLL to VB.net Help Pin
antlers31-Mar-04 6:54
antlers31-Mar-04 6:54 
GeneralRe: Convert C++ DLL to VB.net Help Pin
Mike Dimmick31-Mar-04 12:51
Mike Dimmick31-Mar-04 12:51 
Firstly, you should normally use System.IntPtr for opaque pointer types when using VB.NET. This will help you if you ever port to 64-bit (the IntPtr type is 32 bit in a 32-bit process but 64 bits in a 64-bit process).

As for CP2101_GetProductString, if the C/C++ code is interpreting the lpvDeviceString parameter as a string, you should use
Public Declare Function CP2101_GetProductString Lib "CP2101.dll" ( _
  ByVal DeviceNum As Long, _
  ByVal DeviceString As String, _
  ByVal Options As Long) As Integer
ByRef indicates an in/out parameter. If the function alters this data, you should use a StringBuilder object instead (still passed ByVal), and set its Capacity to the maximum size you expect the function to write.

If you're getting MissingMethodExceptions, your DLL's exports may be mangled. To verify this, use dumpbin /exports. If the output contains ? characters and no recognisable function names, the names are mangled. You have two choices. Either you can rewrite your declarations to use the DllImportAttribute rather than Declare, and use the EntryPointName property to indicate the mangled name, or you can specify extern "C" in front of the exported function declarations to tell the compiler not to mangle the names. Remember that the latter will break binary compatibility with any existing clients.

Stability. What an interesting concept. -- Chris Maunder
Generalcopy constructor / assignment operator Pin
GDavy30-Mar-04 22:48
GDavy30-Mar-04 22:48 
GeneralRe: copy constructor / assignment operator Pin
22491730-Mar-04 23:13
22491730-Mar-04 23:13 
GeneralRe: copy constructor / assignment operator Pin
Prakash Nadar31-Mar-04 5:04
Prakash Nadar31-Mar-04 5:04 
GeneralRe: copy constructor / assignment operator Pin
David Crow31-Mar-04 2:14
David Crow31-Mar-04 2:14 
Generalrandom number Pin
shiva shankar30-Mar-04 22:21
shiva shankar30-Mar-04 22:21 
GeneralRe: random number Pin
SJolly30-Mar-04 23:11
SJolly30-Mar-04 23:11 
GeneralRe: random number Pin
shiva shankar30-Mar-04 23:28
shiva shankar30-Mar-04 23:28 
GeneralRe: random number Pin
Antony M Kancidrowski30-Mar-04 23:49
Antony M Kancidrowski30-Mar-04 23:49 
GeneralRe: random number Pin
SJolly30-Mar-04 23:50
SJolly30-Mar-04 23:50 
GeneralRe: random number Pin
Tim Smith31-Mar-04 3:53
Tim Smith31-Mar-04 3:53 
GeneralRe: random number Pin
SJolly31-Mar-04 4:53
SJolly31-Mar-04 4:53 
GeneralRe: random number Pin
David Crow31-Mar-04 2:21
David Crow31-Mar-04 2:21 
GeneralRe: random number Pin
Paul Ranson31-Mar-04 2:20
Paul Ranson31-Mar-04 2:20 
GeneralRe: random number Pin
Tim Smith31-Mar-04 3:57
Tim Smith31-Mar-04 3:57 
GeneralRe: random number Pin
Paul Ranson31-Mar-04 4:20
Paul Ranson31-Mar-04 4:20 
Generalmpeg streamer Pin
Florin Ochiana30-Mar-04 22:10
Florin Ochiana30-Mar-04 22:10 
GeneralDirectInput Gamepad axes name localization.... Pin
haust30-Mar-04 21:59
haust30-Mar-04 21:59 

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.