Click here to Skip to main content
15,892,059 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: saving path problem, please help. Pin
Anubhava Dimri30-Mar-10 19:04
Anubhava Dimri30-Mar-10 19:04 
GeneralRe: saving path problem, please help. Pin
Farraj30-Mar-10 23:47
Farraj30-Mar-10 23:47 
GeneralRe: saving path problem, please help. Pin
Anubhava Dimri31-Mar-10 0:17
Anubhava Dimri31-Mar-10 0:17 
GeneralRe: saving path problem, please help. Pin
Farraj1-Apr-10 5:17
Farraj1-Apr-10 5:17 
GeneralRe: saving path problem, please help. Pin
Anubhava Dimri1-Apr-10 18:14
Anubhava Dimri1-Apr-10 18:14 
GeneralRe: saving path problem, please help. Pin
Farraj2-Apr-10 1:47
Farraj2-Apr-10 1:47 
GeneralRe: saving path problem, please help. Pin
Anubhava Dimri2-Apr-10 2:41
Anubhava Dimri2-Apr-10 2:41 
QuestionHelp Please : How to send VB data to C++ dl Pin
Amber24526-Mar-10 19:34
Amber24526-Mar-10 19:34 
My c++ dll takes as input char*.
.
bool testdata(char* data, int dataLen)

From Vb I am doing the following
Declare Function testdata Lib "\abcDLL.dll" (ByRef data As Byte(), ByVal dataLen As Integer) As Boolean


Structure Test
Public header As UInt32
Public lst As UInt32
End Structure

'
Private Function StructToByte(ByVal Struct As Object) As Byte()

Dim iStructSize As Integer = Marshal.SizeOf(Struct)
'Dim iStructSize As Integer = Len(Struct)

Dim buffer As IntPtr = Marshal.AllocHGlobal(iStructSize)

Marshal.StructureToPtr(Struct, buffer, False)

Dim btData(iStructSize - 1) As Byte

Marshal.Copy(buffer, btData, 0, iStructSize)
Marshal.FreeHGlobal(buffer)

Return btData

End Function


While calling the above function

Dim tFrom As Test
tFrom.header = 200
tFrom.lst = 200
Dim ByteArray2() As Byte
ByteArray2 = StructToByte(tFrom)

testdata (ByteArray2, 8)

PROBLEM:

The problem is that when in the dll I type cast the ata into a struc containing only 2 integer, I get incorrect values.

I am strugglign with this for the last 2 days, can anyone plese help me out
AnswerRe: Help Please : How to send VB data to C++ dl Pin
T210228-Mar-10 21:26
T210228-Mar-10 21:26 
AnswerRe: Help Please : How to send VB data to C++ dl Pin
Richard MacCutchan28-Mar-10 23:07
mveRichard MacCutchan28-Mar-10 23:07 
QuestionIssue with threading behaviour ... I think Pin
Jack Vanderhorst26-Mar-10 4:54
Jack Vanderhorst26-Mar-10 4:54 
AnswerRe: Issue with threading behaviour ... I think Pin
Luc Pattyn26-Mar-10 5:30
sitebuilderLuc Pattyn26-Mar-10 5:30 
GeneralRe: Issue with threading behaviour ... I think Pin
Jack Vanderhorst27-Mar-10 16:16
Jack Vanderhorst27-Mar-10 16:16 
AnswerRe: Issue with threading behaviour ... I think Pin
Luc Pattyn27-Mar-10 16:24
sitebuilderLuc Pattyn27-Mar-10 16:24 
QuestionO/R -Mapping with .netTiers and Audittrail with Entity Framework?? Pin
andreas.schaerer26-Mar-10 4:23
andreas.schaerer26-Mar-10 4:23 
QuestionHow to read *.dmp file with visual C# .net to search strings in it Pin
harji1725-Mar-10 13:45
harji1725-Mar-10 13:45 
AnswerRepost Pin
Not Active25-Mar-10 14:35
mentorNot Active25-Mar-10 14:35 
QuestionRichTextBox syntax color - find all lines or line by line Pin
norrisMiou25-Mar-10 3:19
norrisMiou25-Mar-10 3:19 
AnswerRe: RichTextBox syntax color - find all lines or line by line Pin
Luc Pattyn25-Mar-10 4:37
sitebuilderLuc Pattyn25-Mar-10 4:37 
NewsGoldman Sachs Vice Presidents Speak Java at Great Indian Developer Summit 2010 Pin
Rajesh557525-Mar-10 1:21
Rajesh557525-Mar-10 1:21 
QuestionMessage Removed Pin
24-Mar-10 19:52
sindhumahe24-Mar-10 19:52 
AnswerRe: building a object file lib Pin
Richard MacCutchan24-Mar-10 22:42
mveRichard MacCutchan24-Mar-10 22:42 
GeneralRe: building a object file lib Pin
sindhumahe24-Mar-10 22:52
sindhumahe24-Mar-10 22:52 
GeneralRe: building a object file lib [modified] Pin
Richard MacCutchan25-Mar-10 2:08
mveRichard MacCutchan25-Mar-10 2:08 
GeneralRe: building a object file lib Pin
Luc Pattyn25-Mar-10 3:04
sitebuilderLuc Pattyn25-Mar-10 3:04 

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.