Click here to Skip to main content
15,894,362 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Very large file problem Pin
Dennis C. Dietrich26-Nov-04 15:28
Dennis C. Dietrich26-Nov-04 15:28 
GeneralRe: Very large file problem Pin
Shree28-Nov-04 3:07
Shree28-Nov-04 3:07 
Generalspecifying proxy for webbrowser Pin
ddd0126-Nov-04 10:47
ddd0126-Nov-04 10:47 
GeneralVB question Pin
Paps226-Nov-04 8:48
Paps226-Nov-04 8:48 
GeneralRe: VB question Pin
sam683ir28-Nov-04 2:46
sam683ir28-Nov-04 2:46 
GeneralRe: VB question Pin
Paps228-Nov-04 3:27
Paps228-Nov-04 3:27 
GeneralRe: Calling a c++ dll Pin
Dave Kreskowiak26-Nov-04 3:26
mveDave Kreskowiak26-Nov-04 3:26 
GeneralRe: Calling a c++ dll Pin
Member 142531829-Nov-04 4:14
Member 142531829-Nov-04 4:14 
The following comes from MSDN Q207931
HOWTO: Pass Arrays Between Visual Basic and C

It is common to call from Microsoft Visual Basic a function in a DLL not specifically intended for Visual Basic, such as Windows API functions. Since the C function expects the address of the first element of the array, you can accomplish this in Visual Basic by passing the first element of the array by reference.

For example, the following is the prototype of a C function that returns the sum of long integers in an array. The first parameter is a pointer to the array and the second provides the number of elements in the array.

long AddLongs_Pointer(long *plArrayOfLongs, long lElements);
The Visual Basic version of the function declaration looks like this:

Declare Function AddLongs_Pointer Lib "MyDll.dll" (FirstElement As Long,
ByVal lElements As Long) As Long
To call the function, use the following code:

Dim MyArrayOfLongs(0 to 10) as Long
Dim lTotal as Long
' Insert code here to initialize the elements of the array
' Calling the function
lTotal = AddLongs_Pointer (MyArrayOfLongs(0), UBound(MyArrayOfLongs) + 1)


GeneralNeed to extract open application window title bar Pin
Member 91913025-Nov-04 22:49
Member 91913025-Nov-04 22:49 
GeneralRe: Need to extract open application window title bar Pin
Dave Kreskowiak26-Nov-04 3:41
mveDave Kreskowiak26-Nov-04 3:41 
GeneralRe: Need to extract open application window title bar Pin
Member 91913028-Nov-04 16:38
Member 91913028-Nov-04 16:38 
GeneralRe: Need to extract open application window title bar Pin
Dave Kreskowiak28-Nov-04 17:20
mveDave Kreskowiak28-Nov-04 17:20 
GeneralRe: Need to extract open application window title bar Pin
Member 91913028-Nov-04 18:33
Member 91913028-Nov-04 18:33 
GeneralRe: Need to extract open application window title bar Pin
Dave Kreskowiak29-Nov-04 1:26
mveDave Kreskowiak29-Nov-04 1:26 
GeneralWant to read from an already opened Notepad file Pin
amitranjanmishra25-Nov-04 21:48
amitranjanmishra25-Nov-04 21:48 
GeneralRe: Want to read from an already opened Notepad file Pin
Dave Kreskowiak26-Nov-04 3:39
mveDave Kreskowiak26-Nov-04 3:39 
GeneralCalling a c++ dll Pin
Cedric Moonen25-Nov-04 21:47
Cedric Moonen25-Nov-04 21:47 
GeneralColor Palette Pin
Sai Ashok25-Nov-04 16:03
Sai Ashok25-Nov-04 16:03 
GeneralRe: Color Palette Pin
Dave Kreskowiak26-Nov-04 3:34
mveDave Kreskowiak26-Nov-04 3:34 
Generalcode documentation Pin
Paebbels25-Nov-04 9:20
Paebbels25-Nov-04 9:20 
GeneralRe: code documentation Pin
Colin Angus Mackay25-Nov-04 22:45
Colin Angus Mackay25-Nov-04 22:45 
GeneralRe: code documentation Pin
Paebbels26-Nov-04 4:33
Paebbels26-Nov-04 4:33 
GeneralRe: code documentation Pin
Dennis C. Dietrich26-Nov-04 5:15
Dennis C. Dietrich26-Nov-04 5:15 
GeneralRe: code documentation Pin
Paebbels26-Nov-04 8:34
Paebbels26-Nov-04 8:34 
GeneralCan't set a link to a exe Project Pin
Paebbels25-Nov-04 9:14
Paebbels25-Nov-04 9:14 

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.