Click here to Skip to main content
15,905,875 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: hexa Pin
aswd17-Feb-09 5:03
aswd17-Feb-09 5:03 
GeneralRe: hexa Pin
EliottA17-Feb-09 5:35
EliottA17-Feb-09 5:35 
GeneralRe: hexa Pin
DaveAuld17-Feb-09 5:55
professionalDaveAuld17-Feb-09 5:55 
GeneralRe: hexa Pin
aswd17-Feb-09 15:30
aswd17-Feb-09 15:30 
GeneralRe: hexa Pin
EliottA18-Feb-09 2:21
EliottA18-Feb-09 2:21 
QuestionInserting Graphs in VB using Visual Studio Pin
EvanSaunders16-Feb-09 20:00
EvanSaunders16-Feb-09 20:00 
AnswerRe: Inserting Graphs in VB using Visual Studio Pin
DaveAuld16-Feb-09 23:27
professionalDaveAuld16-Feb-09 23:27 
QuestionProblem with passing UDT array from Excel VBA to C++ dll Pin
eight16-Feb-09 19:51
eight16-Feb-09 19:51 
Hi. I'm trying to send an array of UDT from Excel VBA to a C++ dll but have no idea which direction I should look. Here's what I'm trying to do
MyTestDLL.cpp
#pragma pack(4)
struct MyCppType
{
    short iVal;
    double dVal;
    BSTR bstr;
};
#pragma pack()
void _stdcall MyDllFunction (array of MyCppType)
{
  //do something with the array  	
}

MyTestDLL.def
LIBRARY	"MyTestDll"
EXPORTS
MyDllFunction	@1

MyTestExcel.xlsm
Option Explicit
Declare Sub MyDllFunction Lib "MyTestDLL.dll" (arr() As MyVbaType)
Type MyVbaType
    iVal As Integer
    dVal As Double
    sVal As String
End Type
Sub Test()
    Dim arr(2) As MyVbaType
    
    arr(1).iVal = 1
    arr(1).dVal = 1.1
    arr(1).sVal = "one"
    
    arr(2).iVal = 2
    arr(2).dVal = 2.2
    arr(2).sVal = "two"
    
    MyDllFunction (arr)    
End Sub

AnswerRe: Problem with passing UDT array from Excel VBA to C++ dll Pin
Dave Kreskowiak17-Feb-09 1:48
mveDave Kreskowiak17-Feb-09 1:48 
GeneralRe: Problem with passing UDT array from Excel VBA to C++ dll Pin
eight17-Feb-09 3:30
eight17-Feb-09 3:30 
GeneralRe: Problem with passing UDT array from Excel VBA to C++ dll Pin
Dave Kreskowiak17-Feb-09 3:40
mveDave Kreskowiak17-Feb-09 3:40 
QuestionHow can i get the reference file (dll) information from the other application (exe) file Pin
kvelu.d16-Feb-09 18:52
kvelu.d16-Feb-09 18:52 
AnswerRe: How can i get the reference file (dll) information from the other application (exe) file Pin
Steven J Jowett17-Feb-09 1:26
Steven J Jowett17-Feb-09 1:26 
AnswerRe: How can i get the reference file (dll) information from the other application (exe) file Pin
Dave Kreskowiak17-Feb-09 1:36
mveDave Kreskowiak17-Feb-09 1:36 
QuestionCheck Box Save Pin
cwscotty16-Feb-09 12:00
cwscotty16-Feb-09 12:00 
AnswerRe: Check Box Save Pin
Paul Hasler16-Feb-09 14:03
Paul Hasler16-Feb-09 14:03 
GeneralRe: Check Box Save Pin
cwscotty16-Feb-09 19:49
cwscotty16-Feb-09 19:49 
QuestionBest Way To Override Keyboard On Form Pin
Ryan Fleming16-Feb-09 9:08
Ryan Fleming16-Feb-09 9:08 
AnswerRe: Best Way To Override Keyboard On Form Pin
Dave Kreskowiak16-Feb-09 14:10
mveDave Kreskowiak16-Feb-09 14:10 
GeneralRe: Best Way To Override Keyboard On Form Pin
Ryan Fleming17-Feb-09 3:15
Ryan Fleming17-Feb-09 3:15 
GeneralRe: Best Way To Override Keyboard On Form Pin
Dave Kreskowiak17-Feb-09 3:39
mveDave Kreskowiak17-Feb-09 3:39 
GeneralRe: Best Way To Override Keyboard On Form Pin
Ryan Fleming17-Feb-09 5:07
Ryan Fleming17-Feb-09 5:07 
GeneralRe: Best Way To Override Keyboard On Form Pin
Dave Kreskowiak17-Feb-09 5:34
mveDave Kreskowiak17-Feb-09 5:34 
GeneralRe: Best Way To Override Keyboard On Form Pin
Ryan Fleming17-Feb-09 6:09
Ryan Fleming17-Feb-09 6:09 
GeneralRe: Best Way To Override Keyboard On Form Pin
Dave Kreskowiak17-Feb-09 6:54
mveDave Kreskowiak17-Feb-09 6:54 

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.