Click here to Skip to main content
15,886,919 members
Home / Discussions / C#
   

C#

 
AnswerRe: Topmost Form Pin
Dave Kreskowiak10-Feb-06 13:52
mveDave Kreskowiak10-Feb-06 13:52 
QuestionOutlook 2003 and Signatures Pin
piXy^10-Feb-06 5:42
piXy^10-Feb-06 5:42 
QuestionFTP client Program with C# Pin
BestArtemis10-Feb-06 5:08
BestArtemis10-Feb-06 5:08 
AnswerRe: FTP client Program with C# Pin
leppie10-Feb-06 5:51
leppie10-Feb-06 5:51 
GeneralRe: FTP client Program with C# Pin
BestArtemis10-Feb-06 7:10
BestArtemis10-Feb-06 7:10 
GeneralRe: FTP client Program with C# Pin
Dave Kreskowiak10-Feb-06 7:34
mveDave Kreskowiak10-Feb-06 7:34 
Questionthe dismatching error with "unsafe" Pin
gary.ruan10-Feb-06 5:01
gary.ruan10-Feb-06 5:01 
AnswerRe: the dismatching error with "unsafe" Pin
Andy Moore10-Feb-06 6:21
Andy Moore10-Feb-06 6:21 
You don't have to use unsafe code here. Why not do something like this.

C#

[DllImport("yourdll")]
public static extern bool SCInit( System.Intptr pInit, int nSize )

Now in your function do this:

SC_InitAsk sca = new SC_InitAsk();
sca.m_Head.m_lIndex = PublicValue.SC_INIT;
sca.m_dwSoftware = 0x12345678;
sca.m_hWnd = this.Handle;

System.IntPtr p;

p = Marshal.AllocHGlobal( Marshal.Sizeof( typeof( SC_InitAsk ) ) );

Marshal.StructureToPtr( sca, p, true );

/*Call your C++ function here*/
SC_Init( p, Marshal.Sizeof( typeof( SC_InitAsk ) );

Marshal.FreeHGlobal( p );


I hope this helps.

Andy


Human beings were not meant to sit in little cubicles staring at computer screens all day, filling out useless forms and listening to eight different bosses drone on about about mission statements. -- Peter Gibbons
Questionhow to encrypt/decrypt exe file on the fly ? Pin
hdv21210-Feb-06 4:16
hdv21210-Feb-06 4:16 
AnswerRe: how to encrypt/decrypt exe file on the fly ? Pin
Ingo10-Feb-06 4:29
Ingo10-Feb-06 4:29 
QuestionHow to do RTP streaming? Pin
Divyang Mithaiwala10-Feb-06 3:38
Divyang Mithaiwala10-Feb-06 3:38 
Questionactivex .ocx with c# and visual studio .net Pin
kopi_b10-Feb-06 3:12
kopi_b10-Feb-06 3:12 
AnswerRe: activex .ocx with c# and visual studio .net Pin
Judah Gabriel Himango10-Feb-06 4:03
sponsorJudah Gabriel Himango10-Feb-06 4:03 
GeneralRe: activex .ocx with c# and visual studio .net Pin
kopi_b10-Feb-06 4:15
kopi_b10-Feb-06 4:15 
GeneralRe: activex .ocx with c# and visual studio .net Pin
Judah Gabriel Himango10-Feb-06 4:25
sponsorJudah Gabriel Himango10-Feb-06 4:25 
GeneralRe: activex .ocx with c# and visual studio .net Pin
kopi_b10-Feb-06 5:08
kopi_b10-Feb-06 5:08 
AnswerRe: activex .ocx with c# and visual studio .net Pin
Dave Kreskowiak10-Feb-06 5:38
mveDave Kreskowiak10-Feb-06 5:38 
GeneralRe: activex .ocx with c# and visual studio .net Pin
Judah Gabriel Himango10-Feb-06 6:03
sponsorJudah Gabriel Himango10-Feb-06 6:03 
GeneralRe: activex .ocx with c# and visual studio .net Pin
Judah Gabriel Himango10-Feb-06 6:32
sponsorJudah Gabriel Himango10-Feb-06 6:32 
GeneralRe: activex .ocx with c# and visual studio .net Pin
Dave Kreskowiak10-Feb-06 7:32
mveDave Kreskowiak10-Feb-06 7:32 
GeneralRe: activex .ocx with c# and visual studio .net Pin
Judah Gabriel Himango10-Feb-06 8:39
sponsorJudah Gabriel Himango10-Feb-06 8:39 
GeneralRe: activex .ocx with c# and visual studio .net Pin
Dave Kreskowiak10-Feb-06 8:41
mveDave Kreskowiak10-Feb-06 8:41 
GeneralRe: activex .ocx with c# and visual studio .net Pin
Judah Gabriel Himango10-Feb-06 9:08
sponsorJudah Gabriel Himango10-Feb-06 9:08 
QuestionNot accept numbers or string in textbox? Pin
WayKlaro!10-Feb-06 3:08
WayKlaro!10-Feb-06 3:08 
AnswerRe: Not accept numbers or string in textbox? Pin
Judah Gabriel Himango10-Feb-06 4:05
sponsorJudah Gabriel Himango10-Feb-06 4:05 

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.