Click here to Skip to main content
15,885,782 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Source code for SQL database Pin
Johan Hakkesteegt12-Nov-09 20:19
Johan Hakkesteegt12-Nov-09 20:19 
AnswerRe: Source code for SQL database Pin
Shameel12-Nov-09 22:54
professionalShameel12-Nov-09 22:54 
AnswerRe: Source code for SQL database Pin
Dave Kreskowiak13-Nov-09 4:19
mveDave Kreskowiak13-Nov-09 4:19 
AnswerRe: Source code for SQL database Pin
Oakman13-Nov-09 5:45
Oakman13-Nov-09 5:45 
QuestionInterop C++ dll from vb.net Pin
ggoutam712-Nov-09 20:07
ggoutam712-Nov-09 20:07 
AnswerRe: Interop C++ dll from vb.net Pin
Luc Pattyn13-Nov-09 1:11
sitebuilderLuc Pattyn13-Nov-09 1:11 
GeneralRe: Interop C++ dll from vb.net Pin
ggoutam715-Nov-09 21:05
ggoutam715-Nov-09 21:05 
GeneralRe: Interop C++ dll from vb.net Pin
Luc Pattyn16-Nov-09 2:46
sitebuilderLuc Pattyn16-Nov-09 2:46 
Hi,

1.
yes ByValArray and SizeConst is what you need to pass an embedded array, here is a C# example:
struct XXX {
    [MarshalAs(UnmanagedType.ByValArray, SizeConst=8)]
    public short[] array;
    ...
}


2.
I forgot to warn you about data sizes: most X86 native compilers consider long a 32-bit integer, so its managed counterpart is an int, not a long.

3.
There are additional marshaling fields for strings that I keep forgetting; they allow you to embed a string content (with fixed maximum length) into a struct. Here is an example, again in C#:
struct XXX {
	[MarshalAs(UnmanagedType.ByValTStr, SizeConst=32)]
	public string lfFaceName;
}


Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages


GeneralRe: Interop C++ dll from vb.net Pin
ggoutam717-Nov-09 0:04
ggoutam717-Nov-09 0:04 
GeneralRe: Interop C++ dll from vb.net Pin
Luc Pattyn17-Nov-09 1:07
sitebuilderLuc Pattyn17-Nov-09 1:07 
QuestionDelete Empty fields from array ! Pin
jeshra27912-Nov-09 11:46
jeshra27912-Nov-09 11:46 
AnswerRe: Delete Empty fields from array ! Pin
Christian Graus12-Nov-09 13:17
protectorChristian Graus12-Nov-09 13:17 
GeneralRe: Delete Empty fields from array ! Pin
Oakman12-Nov-09 15:31
Oakman12-Nov-09 15:31 
GeneralRe: Delete Empty fields from array ! Pin
EliottA12-Nov-09 15:37
EliottA12-Nov-09 15:37 
GeneralRe: Delete Empty fields from array ! Pin
EliottA12-Nov-09 15:38
EliottA12-Nov-09 15:38 
AnswerRe: Delete Empty fields from array ! [modified] Pin
MikeMarq12-Nov-09 16:47
MikeMarq12-Nov-09 16:47 
QuestionJunior Sql Query Pin
beker_usa12-Nov-09 11:20
beker_usa12-Nov-09 11:20 
AnswerRe: Junior Sql Query Pin
beker_usa12-Nov-09 11:29
beker_usa12-Nov-09 11:29 
GeneralRe: Junior Sql Query Pin
Christian Graus12-Nov-09 13:17
protectorChristian Graus12-Nov-09 13:17 
AnswerRe: Junior Sql Query Pin
Luc Pattyn12-Nov-09 11:59
sitebuilderLuc Pattyn12-Nov-09 11:59 
QuestionSplit string Pin
ivo7512-Nov-09 7:38
ivo7512-Nov-09 7:38 
AnswerRe: Split string Pin
Luc Pattyn12-Nov-09 7:42
sitebuilderLuc Pattyn12-Nov-09 7:42 
GeneralRe: Split string Pin
Christian Graus12-Nov-09 9:33
protectorChristian Graus12-Nov-09 9:33 
GeneralRe: Split string Pin
Luc Pattyn12-Nov-09 10:20
sitebuilderLuc Pattyn12-Nov-09 10:20 
AnswerRe: Split string Pin
Kschuler12-Nov-09 7:43
Kschuler12-Nov-09 7:43 

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.