Click here to Skip to main content
16,006,013 members
Home / Discussions / C#
   

C#

 
GeneralWebBrowser's Document Complete event Pin
profoundwhispers29-Jul-04 23:02
profoundwhispers29-Jul-04 23:02 
GeneralRe: WebBrowser's Document Complete event Pin
HiltonG30-Jul-04 2:30
HiltonG30-Jul-04 2:30 
GeneralRe: WebBrowser's Document Complete event Pin
profoundwhispers30-Jul-04 8:33
profoundwhispers30-Jul-04 8:33 
GeneralRe: WebBrowser's Document Complete event Pin
Dave Kreskowiak30-Jul-04 4:27
mveDave Kreskowiak30-Jul-04 4:27 
GeneralInvoking a Win32 DLL from C# Pin
rana7429-Jul-04 23:00
rana7429-Jul-04 23:00 
GeneralRe: Invoking a Win32 DLL from C# Pin
Heath Stewart30-Jul-04 5:53
protectorHeath Stewart30-Jul-04 5:53 
GeneralRe: Invoking a Win32 DLL from C# Pin
rana741-Aug-04 16:18
rana741-Aug-04 16:18 
GeneralRe: Invoking a Win32 DLL from C# Pin
Heath Stewart4-Aug-04 5:04
protectorHeath Stewart4-Aug-04 5:04 
You map a DLL in your process space just to execute an application (out-of-process)? Odd, but whatever.

See the MarshalAsAttirbute class in the .NET Framework SDK. Since you're using char* and not TCHAR*, be sure to specify CharSet=CharSet.Ansi in your MarshalAsAttribute and to use the right UnmanagedType enumerations to declare it like so:
[DllImport("xxx.dll", ExactSpelling=true, CharSet=CharSet.Ansi)]
private static extern int main(
  int argc,
  [MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0,
    ArraySubType=UnmanagedType.LPStr)] string[] argv);
But what's the point of sending an array (marshalling it is slower) if you're just going to pass a single string? All you're doing is wrapping CreateProcess or something (which is a waste since Process.Start encapsulates that already) so why not just declare a function that takes a string argument?

 

Microsoft MVP, Visual C#
My Articles
Questionhow do i pass null to dateTime variable Pin
robmays29-Jul-04 22:56
robmays29-Jul-04 22:56 
AnswerRe: how do i pass null to dateTime variable Pin
Ryan Roberts30-Jul-04 0:15
Ryan Roberts30-Jul-04 0:15 
GeneralRe: how do i pass null to dateTime variable Pin
robmays30-Jul-04 0:17
robmays30-Jul-04 0:17 
QuestionHow to passing parameters from eVC++ to a running C# program? Pin
ting66829-Jul-04 22:40
ting66829-Jul-04 22:40 
AnswerRe: How to passing parameters from eVC++ to a running C# program? Pin
Heath Stewart30-Jul-04 5:40
protectorHeath Stewart30-Jul-04 5:40 
Questionmatching regex at exact index? Pin
Roger Alsing29-Jul-04 21:44
Roger Alsing29-Jul-04 21:44 
AnswerRe: matching regex at exact index? Pin
Heath Stewart30-Jul-04 4:55
protectorHeath Stewart30-Jul-04 4:55 
GeneralRe: matching regex at exact index? Pin
Roger Alsing30-Jul-04 5:14
Roger Alsing30-Jul-04 5:14 
GeneralRe: matching regex at exact index? Pin
Roger Alsing1-Aug-04 7:25
Roger Alsing1-Aug-04 7:25 
Generalspitter problem Pin
samithas29-Jul-04 19:30
samithas29-Jul-04 19:30 
GeneralRe: spitter problem Pin
Heath Stewart30-Jul-04 4:51
protectorHeath Stewart30-Jul-04 4:51 
GeneralUsing Interop.Outlook problem (Windows Services) Pin
enchanted29-Jul-04 18:37
enchanted29-Jul-04 18:37 
GeneralRe: Using Interop.Outlook problem (Windows Services) Pin
Heath Stewart30-Jul-04 4:41
protectorHeath Stewart30-Jul-04 4:41 
QuestionHas anybody used the control "MagicLibrary" supplied by codeproject? Pin
ILoveCS29-Jul-04 17:41
ILoveCS29-Jul-04 17:41 
AnswerRe: Has anybody used the control "MagicLibrary" supplied by codeproject? Pin
Colin Angus Mackay29-Jul-04 22:42
Colin Angus Mackay29-Jul-04 22:42 
GeneralRe: Has anybody used the control "MagicLibrary" supplied by codeproject? Pin
ILoveCS1-Aug-04 15:36
ILoveCS1-Aug-04 15:36 
GeneralRe: Has anybody used the control "MagicLibrary" supplied by codeproject? Pin
Colin Angus Mackay1-Aug-04 20:12
Colin Angus Mackay1-Aug-04 20:12 

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.