Click here to Skip to main content
15,851,510 members
Home / Discussions / C#
   

C#

 
GeneralRe: Handling of unmanaged code by the .NET environment Pin
Eric Gunnerson (msft)9-Oct-02 9:31
Eric Gunnerson (msft)9-Oct-02 9:31 
GeneralOrder of events when a form is displayed Pin
Wjousts9-Oct-02 3:00
Wjousts9-Oct-02 3:00 
GeneralRe: Order of events when a form is displayed Pin
Daniel Turini9-Oct-02 5:01
Daniel Turini9-Oct-02 5:01 
GeneralRe: Order of events when a form is displayed Pin
Gaul9-Oct-02 6:24
Gaul9-Oct-02 6:24 
GeneralRe: Order of events when a form is displayed Pin
Wjousts9-Oct-02 11:54
Wjousts9-Oct-02 11:54 
Questionhow to do it??? Pin
8-Oct-02 22:04
suss8-Oct-02 22:04 
AnswerRe: how to do it??? Pin
Marc Clifton9-Oct-02 1:10
mvaMarc Clifton9-Oct-02 1:10 
QuestionPlatform invoke??? Pin
Vu Truong8-Oct-02 18:54
Vu Truong8-Oct-02 18:54 
Hi all,

using System.Runtime.InteropServices;
...
[DllImport("ole32.dll")]
public static extern long CLSIDFromProgID(string ProgID, out Guid clsID);
...
Guid clsID;
long ret = CLSIDFromProgID("Excel.Application", out clsID);

if(ret==0)
System.Console.WriteLine("OK.");
else
System.Console.WriteLine("Fail.");

I use above codes for checking Microsoft Excel is installed or not. But it doesn't work at all, even if I already installed Microsoft Excel.

Are there any missing in my codes?
AnswerRe: Platform invoke??? Pin
Stephane Rodriguez.8-Oct-02 20:31
Stephane Rodriguez.8-Oct-02 20:31 
GeneralRe: Platform invoke??? Pin
Vu Truong8-Oct-02 22:08
Vu Truong8-Oct-02 22:08 
AnswerRe: Platform invoke??? Pin
Richard Deeming9-Oct-02 2:22
mveRichard Deeming9-Oct-02 2:22 
AnswerRe: Platform invoke??? Pin
Eric Gunnerson (msft)9-Oct-02 9:25
Eric Gunnerson (msft)9-Oct-02 9:25 
GeneralRe: Platform invoke??? Pin
Jörgen Sigvardsson9-Oct-02 14:43
Jörgen Sigvardsson9-Oct-02 14:43 
GeneralRe: Platform invoke??? Pin
Eric Gunnerson (msft)10-Oct-02 8:58
Eric Gunnerson (msft)10-Oct-02 8:58 
GeneralRe: Platform invoke??? Pin
David Stone9-Oct-02 15:21
sitebuilderDavid Stone9-Oct-02 15:21 
GeneralRe: Platform invoke??? Pin
Eric Gunnerson (msft)10-Oct-02 8:54
Eric Gunnerson (msft)10-Oct-02 8:54 
GeneralRe: Platform invoke??? Pin
Jörgen Sigvardsson10-Oct-02 9:51
Jörgen Sigvardsson10-Oct-02 9:51 
GeneralRe: Platform invoke??? Pin
Eric Gunnerson (msft)10-Oct-02 10:00
Eric Gunnerson (msft)10-Oct-02 10:00 
GeneralRe: Platform invoke??? Pin
Nick Parker10-Oct-02 10:29
protectorNick Parker10-Oct-02 10:29 
GeneralRe: Platform invoke??? Pin
Eric Gunnerson (msft)10-Oct-02 11:17
Eric Gunnerson (msft)10-Oct-02 11:17 
GeneralRe: Platform invoke??? Pin
Nick Parker10-Oct-02 11:20
protectorNick Parker10-Oct-02 11:20 
GeneralRe: Platform invoke??? Pin
David Stone10-Oct-02 12:34
sitebuilderDavid Stone10-Oct-02 12:34 
GeneralRe: Platform invoke??? Pin
Eric Gunnerson (msft)10-Oct-02 12:51
Eric Gunnerson (msft)10-Oct-02 12:51 
GeneralRe: Platform invoke??? Pin
David Stone10-Oct-02 16:53
sitebuilderDavid Stone10-Oct-02 16:53 
GeneralRe: Platform invoke??? Pin
Vu Truong9-Oct-02 19:21
Vu Truong9-Oct-02 19:21 

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.