Click here to Skip to main content
15,920,670 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to access remote database server from windows service Pin
zhaopi10-Jul-05 23:58
zhaopi10-Jul-05 23:58 
AnswerRe: How to access remote database server from windows service Pin
Magnus Westin11-Jul-05 4:09
Magnus Westin11-Jul-05 4:09 
GeneralRe: How to access remote database server from windows service Pin
zhaopi11-Jul-05 15:06
zhaopi11-Jul-05 15:06 
GeneralRe: How to access remote database server from windows service Pin
zhaopi11-Jul-05 15:15
zhaopi11-Jul-05 15:15 
AnswerRe: How to access remote database server from windows service Pin
BambooMoon11-Jul-05 5:21
BambooMoon11-Jul-05 5:21 
GeneralRe: How to access remote database server from windows service Pin
zhaopi11-Jul-05 15:12
zhaopi11-Jul-05 15:12 
GeneralPass structure to C# Pin
Member 12566510-Jul-05 23:44
Member 12566510-Jul-05 23:44 
GeneralRe: Pass structure to C# Pin
Andy Moore12-Jul-05 7:21
Andy Moore12-Jul-05 7:21 
--Your C++ code would look like the following

typedef struct St
{
     int a;
     int b;
}

__declspec(dllexport) void SetMyStruct( St* s );

--Now, in your c# code you would do the following:

[System.Runtime.InteropServices.LayoutKind(LayoutKindSequential)]
public struct St
{
    public int a;
    public int b;
}

public class MyClass
{
    [DllImport("mydll.dll")]
     public static extern void SetMyStruct( ref St s );
}


I hope this helps.



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
GeneralWSASocket problem in XP Pro Pin
Anonymous10-Jul-05 23:32
Anonymous10-Jul-05 23:32 
QuestionHow to print to virtual printer from Window Service (in not login state) Pin
Anonymous10-Jul-05 23:29
Anonymous10-Jul-05 23:29 
GeneralButton activation Pin
antoine_david10-Jul-05 22:07
antoine_david10-Jul-05 22:07 
GeneralRe: Button activation Pin
Cedric Moonen10-Jul-05 22:17
Cedric Moonen10-Jul-05 22:17 
GeneralRe: Button activation Pin
antoine_david10-Jul-05 22:22
antoine_david10-Jul-05 22:22 
GeneralRectangle Selection Pin
javi_jmc10-Jul-05 21:33
javi_jmc10-Jul-05 21:33 
GeneralRe: Rectangle Selection Pin
Jose Lamas Rios11-Jul-05 2:40
Jose Lamas Rios11-Jul-05 2:40 
GeneralRe: Rectangle Selection Pin
Blake Miller11-Jul-05 4:57
Blake Miller11-Jul-05 4:57 
GeneralMFC Calling .NET Pin
quesansii10-Jul-05 20:31
quesansii10-Jul-05 20:31 
GeneralMaking a dialog over everything - even games Pin
awah10-Jul-05 20:30
awah10-Jul-05 20:30 
GeneralRe: Making a dialog over everything - even games Pin
David Crow11-Jul-05 3:11
David Crow11-Jul-05 3:11 
GeneralRe: Making a dialog over everything - even games Pin
awah12-Jul-05 17:20
awah12-Jul-05 17:20 
Questiona paradox in mfc head file? Pin
wrb30210-Jul-05 20:29
wrb30210-Jul-05 20:29 
AnswerRe: a paradox in mfc head file? Pin
David Crow11-Jul-05 3:44
David Crow11-Jul-05 3:44 
GeneralQuestion about displaying a property page Pin
PrashantJ10-Jul-05 20:14
PrashantJ10-Jul-05 20:14 
GeneralAbout building a Windows service Pin
zhaopi10-Jul-05 20:04
zhaopi10-Jul-05 20:04 
GeneralRe: About building a Windows service Pin
zhaopi10-Jul-05 20:07
zhaopi10-Jul-05 20:07 

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.