Click here to Skip to main content
15,923,083 members
Home / Discussions / C#
   

C#

 
QuestionA new type of number incrementor.... perhaps? Pin
CAgent0074-Aug-06 12:08
CAgent0074-Aug-06 12:08 
AnswerRe: A new type of number incrementor.... perhaps? Pin
Guffa4-Aug-06 12:15
Guffa4-Aug-06 12:15 
GeneralRe: A new type of number incrementor.... perhaps? Pin
CAgent0075-Aug-06 10:52
CAgent0075-Aug-06 10:52 
QuestionRe: A new type of number incrementor.... perhaps? Pin
CAgent0076-Aug-06 11:27
CAgent0076-Aug-06 11:27 
AnswerRe: A new type of number incrementor.... perhaps? Pin
Leslie Sanford4-Aug-06 16:01
Leslie Sanford4-Aug-06 16:01 
QuestionTimers Pin
SoftcodeSoftware4-Aug-06 10:51
SoftcodeSoftware4-Aug-06 10:51 
AnswerRe: Timers Pin
Not Active4-Aug-06 11:11
mentorNot Active4-Aug-06 11:11 
GeneralRe: Timers Pin
SoftcodeSoftware4-Aug-06 11:16
SoftcodeSoftware4-Aug-06 11:16 
GeneralRe: Timers Pin
Dave Kreskowiak4-Aug-06 11:53
mveDave Kreskowiak4-Aug-06 11:53 
GeneralRe: Timers Pin
SoftcodeSoftware4-Aug-06 12:22
SoftcodeSoftware4-Aug-06 12:22 
GeneralRe: Timers Pin
Dave Kreskowiak4-Aug-06 16:18
mveDave Kreskowiak4-Aug-06 16:18 
AnswerRe: Timers Pin
eggie55-Aug-06 20:51
eggie55-Aug-06 20:51 
QuestionString into resource? [modified] Pin
SoftcodeSoftware4-Aug-06 10:30
SoftcodeSoftware4-Aug-06 10:30 
AnswerRe: String into resource? Pin
Judah Gabriel Himango4-Aug-06 11:21
sponsorJudah Gabriel Himango4-Aug-06 11:21 
GeneralRe: String into resource? Pin
SoftcodeSoftware4-Aug-06 11:34
SoftcodeSoftware4-Aug-06 11:34 
GeneralRe: String into resource? Pin
Judah Gabriel Himango5-Aug-06 10:32
sponsorJudah Gabriel Himango5-Aug-06 10:32 
QuestionUnmanaged C++ DLL Calling Pin
skinnyreptile1684-Aug-06 9:38
skinnyreptile1684-Aug-06 9:38 
I have an unmanaged C++ DLL which has the following structures,
typedef struct {char str[200]; } MYARRAY1;
typedef struct {MYARRAY1 myarray1struct;} MYARRAY2;
typedef struct {MYARRAY2 myarray1struct[5];} MYARRAY3;

To return MYARRAY2, I used the following entry function,
extern "C" __declspec(dllexport) void CallTestArray2( MYARRAY2 *pStruct)

To return MYARRAY3, I used the following entry function,
extern "C" __declspec(dllexport) void CallTestArray3( MYARRAY3 *pStruct)



In C#, I declared the following structures,

[StructLayout(LayoutKind.Sequential)]
public struct MyArray1
{
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=200)] public String str;
}

[StructLayout(LayoutKind.Sequential)]
public struct MyArray2
{
public MyArray1 tempArray1;
}

[StructLayout(LayoutKind.Sequential)]
public struct MyArray3
{
public MyArray2[] tempArray2;
}

I do not have any problem using DLLImport call to C++ DLL to get data in MyArray2, however when I try to get data in MyArray3 with the following code, all data in testArray3 are empty.

MyArray3 testArray3 = new MyArray3();
testArray3.tempArray2 = new MyArray2[ 5 ];
CallTestArray3(ref testArray3);

Any help is appreciated!!!
AnswerRe: Unmanaged C++ DLL Calling Pin
NrmMyth4-Aug-06 20:25
NrmMyth4-Aug-06 20:25 
GeneralRe: Unmanaged C++ DLL Calling Pin
skinnyreptile1687-Aug-06 4:49
skinnyreptile1687-Aug-06 4:49 
Questionproblems getting the DataGridView to do what I want it to do!!!??? Pin
LongRange.Shooter4-Aug-06 9:35
LongRange.Shooter4-Aug-06 9:35 
AnswerRe: problems getting the DataGridView to do what I want it to do!!!??? Pin
wout de zeeuw4-Aug-06 9:56
wout de zeeuw4-Aug-06 9:56 
GeneralRe: problems getting the DataGridView to do what I want it to do!!!??? Pin
LongRange.Shooter4-Aug-06 11:32
LongRange.Shooter4-Aug-06 11:32 
GeneralRe: problems getting the DataGridView to do what I want it to do!!!??? Pin
wout de zeeuw4-Aug-06 12:18
wout de zeeuw4-Aug-06 12:18 
QuestionMessage Box Office 2003 Style Pin
sahaas4-Aug-06 8:24
sahaas4-Aug-06 8:24 
AnswerRe: Message Box Office 2003 Style Pin
Judah Gabriel Himango4-Aug-06 11:22
sponsorJudah Gabriel Himango4-Aug-06 11:22 

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.