Click here to Skip to main content
15,911,785 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: conversion Pin
Lakitu23-Sep-02 0:55
Lakitu23-Sep-02 0:55 
GeneralRe: conversion Pin
jmkhael23-Sep-02 2:09
jmkhael23-Sep-02 2:09 
GeneralRe: conversion Pin
Rashid Thadha23-Sep-02 2:40
Rashid Thadha23-Sep-02 2:40 
GeneralRe: UnregisterClass and atoms Pin
Lakitu23-Sep-02 0:47
Lakitu23-Sep-02 0:47 
GeneralRe: UnregisterClass and atoms Pin
Lakitu23-Sep-02 1:12
Lakitu23-Sep-02 1:12 
GeneralRe: UnregisterClass and atoms Pin
Lakitu23-Sep-02 2:37
Lakitu23-Sep-02 2:37 
GeneralRe: UnregisterClass and atoms Pin
Andreas Saurwein23-Sep-02 2:45
Andreas Saurwein23-Sep-02 2:45 
GeneralVB call 'C" dll, not C++ dll Pin
DC23-Sep-02 0:32
DC23-Sep-02 0:32 
When I use VB.NET to call a 'C' dll. It displayed error as follow

ERROR
=====
"Object reference not set to an instance of an object."

'C' FILE (Not C++, so hasn't used _stdcall)
===========================================
BOOLEAN WINAPI PacketGetAdapterNames(PTSTR pStr,PULONG BufferSize)

'DEF' FILE
==========
EXPORT
PacketGetAdapterNames

In VB.NET
=========
Private Declare Function PacketGetAdapterNames Lib "packet.dll" (<marshalas(unmanagedtype.lpwstr)> ByVal lpBuf As String, <marshalas(unmanagedtype.u8)> ByVal BufferSize As Long) As Boolean
.
.
lSuccess = PacketGetAdapterNames(Name, Size)
.

It display error.

More investigation
==================
I try to use "LoadLibrary" and "GetProcAddress" to test its existence. It hasn't reported error.

I also write another routine in C++ with same argument, no error.


So, any ideas on how to call this 'C' routine in VB ?

Danny
GeneralString problem Pin
chen23-Sep-02 0:14
chen23-Sep-02 0:14 
GeneralRe: String problem Pin
Lakitu23-Sep-02 0:21
Lakitu23-Sep-02 0:21 
QuestionGetting version number of IUnknown interface? Pin
Jonathan de Halleux22-Sep-02 23:29
Jonathan de Halleux22-Sep-02 23:29 
AnswerRe: Getting version number of IUnknown interface? Pin
Lakitu23-Sep-02 0:14
Lakitu23-Sep-02 0:14 
GeneralRe: Getting version number of IUnknown interface? Pin
Jonathan de Halleux23-Sep-02 1:16
Jonathan de Halleux23-Sep-02 1:16 
QuestionHo to execute a last executable when I shutdown? Pin
Raphael Kindt22-Sep-02 22:57
Raphael Kindt22-Sep-02 22:57 
AnswerRe: Ho to execute a last executable when I shutdown? Pin
Stephane Rodriguez.23-Sep-02 0:29
Stephane Rodriguez.23-Sep-02 0:29 
GeneralRe: Ho to execute a last executable when I shutdown? Pin
Raphael Kindt23-Sep-02 0:47
Raphael Kindt23-Sep-02 0:47 
GeneralWindow message Pin
Anonymous22-Sep-02 22:52
Anonymous22-Sep-02 22:52 
GeneralRe: Window message Pin
jhwurmbach22-Sep-02 23:23
jhwurmbach22-Sep-02 23:23 
GeneralSelecting text in WebBrowser control Pin
Hans Ruck22-Sep-02 22:55
Hans Ruck22-Sep-02 22:55 
GeneralRe: Selecting text in WebBrowser control Pin
Stephane Rodriguez.23-Sep-02 0:26
Stephane Rodriguez.23-Sep-02 0:26 
GeneralRe: Selecting text in WebBrowser control Pin
Hans Ruck23-Sep-02 0:43
Hans Ruck23-Sep-02 0:43 
GeneralRe: Selecting text in WebBrowser control Pin
Stephane Rodriguez.23-Sep-02 1:12
Stephane Rodriguez.23-Sep-02 1:12 
GeneralRe: Selecting text in WebBrowser control Pin
Hans Ruck23-Sep-02 2:15
Hans Ruck23-Sep-02 2:15 
GeneralPostMessage Problem Pin
jmkhael22-Sep-02 21:51
jmkhael22-Sep-02 21:51 
GeneralRe: PostMessage Problem Pin
Lakitu23-Sep-02 0:04
Lakitu23-Sep-02 0:04 

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.