Click here to Skip to main content
16,008,183 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionFilter data in DataGridView Pin
Brian Holdridge22-Feb-06 9:00
Brian Holdridge22-Feb-06 9:00 
AnswerRe: Filter data in DataGridView Pin
RichardBerry22-Feb-06 22:38
RichardBerry22-Feb-06 22:38 
GeneralRe: Filter data in DataGridView Pin
Brian Holdridge24-Feb-06 2:34
Brian Holdridge24-Feb-06 2:34 
QuestionPassing object from one form to another Pin
G7236022-Feb-06 8:52
G7236022-Feb-06 8:52 
AnswerRe: Passing object from one form to another Pin
Joshua Quick22-Feb-06 13:09
Joshua Quick22-Feb-06 13:09 
QuestionDatagrids and the Date....... Pin
daviiie22-Feb-06 6:34
daviiie22-Feb-06 6:34 
AnswerRe: Datagrids and the Date....... Pin
RichardBerry22-Feb-06 20:59
RichardBerry22-Feb-06 20:59 
QuestionPassing Arrays of structures from VB.NET to unmanaged C++ Pin
CPop22-Feb-06 6:17
CPop22-Feb-06 6:17 
Posted this on the Visual C++ as well maybe I will find somebody that can help.
I have been looking for an answer on this one, but found only references to structures. Basically I have a VB.NET structure containing an member array of onother structure that has to be passed to unmanaged C++. I have been able to pass the structure which has members of type structure, but as soon as I define a member array of that structure I get an error: "An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll
Additional information: The operation completed successfully."

This is how I am doing it:

VB.NET:

Public Structure SndStr2
<marshalas(unmanagedtype.i4)> Public memb1 As Integer
<marshalas(unmanagedtype.lpstr)> Public memb2 As String
<marshalas(unmanagedtype.i4)> Public memb3 As Integer
<marshalas(unmanagedtype.i4)> Public memb4 As Integer
End Structure

Public Structure SndStr1
<marshalas(unmanagedtype.i4)> Public memb1 As Integer
<marshalas(unmanagedtype.lpstr)> Public memb2 As String
<marshalas(unmanagedtype.i4)> Public memb3 As Integer
<marshalas(unmanagedtype.r8)> Public memb4 As Double
Public memb5() As SndStr2
End Structure

Declaration: Private Declare Function RcvFun Lib "...\RcvFun.dll" _
(ByRef SndVar As SndStr1) As String



Unmanaged C++:

struct RcvStr1 {
int memb1;
LPSTR memb2;
int memb3;
int memb4;
};

struct RcvStr2{
int memb1;
LPSTR memb2;
int memb3;
double memb4;
RcvStr1 *memb5;
};

LPSTR __declspec (dllexport) __stdcall RcvFun(RcvStr2 **RcvPtr)
{
RcvStr1 RcvVar1;

RcvVar1 = RcvPtr[0]->memb5[0];
return RcvVar1.memb2;

}

If there is anybody out there that did this before, please help!Confused | :confused:
QuestionHow to use an HttpWebClientProtocol class Pin
Hohnerman2022-Feb-06 6:03
Hohnerman2022-Feb-06 6:03 
QuestionHow do i assign variables in VB.NET? Pin
Slow Learner22-Feb-06 5:26
Slow Learner22-Feb-06 5:26 
AnswerRe: How do i assign variables in VB.NET? Pin
ToddHileHoffer22-Feb-06 5:53
ToddHileHoffer22-Feb-06 5:53 
GeneralRe: How do i assign variables in VB.NET? Pin
Slow Learner22-Feb-06 6:02
Slow Learner22-Feb-06 6:02 
GeneralRe: How do i assign variables in VB.NET? Pin
MohammadAmiry23-Feb-06 5:13
MohammadAmiry23-Feb-06 5:13 
QuestionNeed help on String manipulation Pin
Slow Learner22-Feb-06 5:20
Slow Learner22-Feb-06 5:20 
AnswerRe: Need help on String manipulation Pin
Jason McBurney22-Feb-06 5:23
Jason McBurney22-Feb-06 5:23 
GeneralRe: Need help on String manipulation Pin
Slow Learner22-Feb-06 5:37
Slow Learner22-Feb-06 5:37 
GeneralRe: Need help on String manipulation Pin
Jason McBurney22-Feb-06 5:44
Jason McBurney22-Feb-06 5:44 
GeneralRe: Need help on String manipulation Pin
Slow Learner22-Feb-06 5:52
Slow Learner22-Feb-06 5:52 
GeneralRe: Need help on String manipulation Pin
Jason McBurney22-Feb-06 6:36
Jason McBurney22-Feb-06 6:36 
GeneralRe: Need help on String manipulation Pin
Slow Learner22-Feb-06 8:14
Slow Learner22-Feb-06 8:14 
GeneralRe: Need help on String manipulation Pin
Guffa22-Feb-06 9:53
Guffa22-Feb-06 9:53 
GeneralRe: Need help on String manipulation Pin
Slow Learner22-Feb-06 10:57
Slow Learner22-Feb-06 10:57 
AnswerRe: Need help on String manipulation Pin
Guffa22-Feb-06 11:52
Guffa22-Feb-06 11:52 
Questionvb.net problem Pin
pankajgarg1222-Feb-06 4:53
pankajgarg1222-Feb-06 4:53 
AnswerRe: vb.net problem Pin
Jason McBurney22-Feb-06 8:56
Jason McBurney22-Feb-06 8:56 

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.