I have to interface with a C Dll (not mine, 3rd party) that I have no
vb.net declares for, so I'm having to create them. I'm having a little
trouble translating some of the types.
The C Dll call:
int LS1 (HWND hwnd, HANDLE hInst, SHORT s1, SHORT *s2);
I am having trouble translating the pointer to s2. I get an error on
the call (something about an object not instantiated), so I'm not sure
its related to my declare or not, but its in the call.
my declare:
Declare Function LS1 Lib "lsx.dll" (ByVal hWnd As IntPtr, ByVal hInst
As IntPtr, ByVal s1 As Int16, ByVal hConnect As IntPtr) As Int16
I'm not sure how to handle the SHORT *s2 pointer. Is what I have the
correct way to do it ? Does it have to be initialized or something
first ?
Any ideas would be appreciated.
TIA,
Mark 1 1078
On 2005-02-23, ma*****@yahoo.com <ma*****@yahoo.com> wrote: I have to interface with a C Dll (not mine, 3rd party) that I have no vb.net declares for, so I'm having to create them. I'm having a little trouble translating some of the types.
The C Dll call:
int LS1 (HWND hwnd, HANDLE hInst, SHORT s1, SHORT *s2);
I am having trouble translating the pointer to s2. I get an error on the call (something about an object not instantiated), so I'm not sure its related to my declare or not, but its in the call.
my declare:
Declare Function LS1 Lib "lsx.dll" (ByVal hWnd As IntPtr, ByVal hInst As IntPtr, ByVal s1 As Int16, ByVal hConnect As IntPtr) As Int16
Declare Function LS1 Lib "lsx.dll" _
(ByVal hWnd As IntPtr, _
ByVal hInst As IntPtr, _
ByVal s1 As Int16, _
ByRef s2 As Int16) As Int32
--
Tom Shelton [MVP] This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Alf P. Steinbach |
last post by:
So, I got the itch to write something more...
I apologize for not doing more on the attempted "Correct C++ Tutorial"
earlier, but there were reasons.
This is an UNFINISHED and RAW document,...
|
by: Mikhail Teterin |
last post by:
Hello!
I'd like to have a variable of a pointer-to-function type. The two possible
values are of type (*)(FILE *) and (*)(void *). For example:
getter = straight ? fgetc : gzgetc;
nextchar...
|
by: Alfonso Morra |
last post by:
How can this work ?
I have the following declarations in a header:
Header
=========
typedef void (*VFPTR)(void) ;
void FOO_Callback(void*, char*, char*, int, unsigned long, void*,void*);...
|
by: Alf P. Steinbach |
last post by:
Not yet perfect, but:
http://home.no.net/dubjai/win32cpptut/special/pointers/ch_01.pdf
http://home.no.net/dubjai/win32cpptut/special/pointers/ch_01_examples.zip
To access the table of...
|
by: Eli Luong |
last post by:
Hi,
Sorry if I accidentally posted a blank post before.
But, I was wondering, I'm practicing with pointers right now, and
wanted to know if I am using it correctly in the following code. By...
|
by: Sidhu |
last post by:
Hai,
I like 2 know more abot pointers. Can you please tell me the fields
in which pointers are widely used.
Yours
Sidhu
|
by: ivan.leben |
last post by:
I want to write a Mesh class using half-edges. This class uses three
other classes: Vertex, HalfEdge and Face. These classes should be
linked properly in the process of building up the mesh by...
|
by: Boris |
last post by:
I had a 3 hours meeting today with some fellow programmers that are partly
not convinced about using smart pointers in C++. Their main concern is a
possible performance impact. I've been explaining...
|
by: MQ |
last post by:
Can someone tell me where I should use pointers and where I should use
references? In his book, Stroustrup says that you should use pointers
for passing arguments that are to be modified, not...
|
by: pateldm15 |
last post by:
How do I sort an string array using pointers
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |