Click here to Skip to main content
15,922,145 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem with Array of char* Pin
error140818-Feb-09 2:10
error140818-Feb-09 2:10 
GeneralRe: Problem with Array of char* Pin
CPallini18-Feb-09 2:28
mveCPallini18-Feb-09 2:28 
GeneralRe: Problem with Array of char* Pin
error140818-Feb-09 2:40
error140818-Feb-09 2:40 
GeneralRe: Problem with Array of char* Pin
CPallini18-Feb-09 3:10
mveCPallini18-Feb-09 3:10 
GeneralRe: Problem with Array of char* Pin
error140818-Feb-09 3:13
error140818-Feb-09 3:13 
GeneralRe: Problem with Array of char* Pin
CPallini18-Feb-09 3:18
mveCPallini18-Feb-09 3:18 
GeneralRe: Problem with Array of char* Pin
Arman S.18-Feb-09 2:03
Arman S.18-Feb-09 2:03 
QuestionRe: Problem with Array of char* Pin
David Crow18-Feb-09 3:19
David Crow18-Feb-09 3:19 
AnswerRe: Problem with Array of char* Pin
error140818-Feb-09 5:25
error140818-Feb-09 5:25 
GeneralRe: Problem with Array of char* Pin
David Crow18-Feb-09 5:30
David Crow18-Feb-09 5:30 
GeneralRe: Problem with Array of char* Pin
error140818-Feb-09 6:00
error140818-Feb-09 6:00 
GeneralRe: Problem with Array of char* Pin
David Crow18-Feb-09 6:06
David Crow18-Feb-09 6:06 
GeneralRe: Problem with Array of char* Pin
ilostmyid218-Feb-09 19:32
professionalilostmyid218-Feb-09 19:32 
QuestionHow to change the column order or position? Pin
mikert_200817-Feb-09 23:53
mikert_200817-Feb-09 23:53 
AnswerRe: How to change the column order or position? Pin
David Crow18-Feb-09 3:21
David Crow18-Feb-09 3:21 
Questionsaving list control data in a string Pin
brucewayn17-Feb-09 23:48
brucewayn17-Feb-09 23:48 
AnswerRe: saving list control data in a string Pin
«_Superman_»17-Feb-09 23:58
professional«_Superman_»17-Feb-09 23:58 
AnswerRe: saving list control data in a string Pin
Sarath C18-Feb-09 0:08
Sarath C18-Feb-09 0:08 
QuestionRe: saving list control data in a string Pin
brucewayn18-Feb-09 0:21
brucewayn18-Feb-09 0:21 
AnswerRe: saving list control data in a string Pin
Sarath C18-Feb-09 0:28
Sarath C18-Feb-09 0:28 
QuestionSuppressing dialog UI in a property sheet Pin
Mushtaque Nizamani17-Feb-09 23:28
Mushtaque Nizamani17-Feb-09 23:28 
AnswerRe: Suppressing dialog UI in a property sheet Pin
«_Superman_»17-Feb-09 23:42
professional«_Superman_»17-Feb-09 23:42 
GeneralRe: Suppressing dialog UI in a property sheet Pin
Mushtaque Nizamani18-Feb-09 0:02
Mushtaque Nizamani18-Feb-09 0:02 
AnswerRe: Suppressing dialog UI in a property sheet Pin
_AnsHUMAN_ 18-Feb-09 0:14
_AnsHUMAN_ 18-Feb-09 0:14 
QuestionProblem passing an array of UDT from Excel VBA to a C++ dll Pin
eight17-Feb-09 23:28
eight17-Feb-09 23:28 
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


I've posted this problem on the VB forum and was advised to post it here. Please help Sigh | :sigh:

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.