Click here to Skip to main content
15,898,020 members
Home / Discussions / C#
   

C#

 
GeneralExecuting applications Pin
Jon G3-May-04 11:59
Jon G3-May-04 11:59 
GeneralRe: Executing applications Pin
Colin Angus Mackay3-May-04 12:01
Colin Angus Mackay3-May-04 12:01 
GeneralListView and Column Margin :: C# Pin
valikac3-May-04 11:33
valikac3-May-04 11:33 
GeneralRe: ListView and Column Margin :: C# Pin
Heath Stewart4-May-04 3:32
protectorHeath Stewart4-May-04 3:32 
GeneralRe: ListView and Column Margin :: C# Pin
valikac4-May-04 3:48
valikac4-May-04 3:48 
GeneralIButtonControl Pin
K4reem3-May-04 10:57
K4reem3-May-04 10:57 
GeneralRe: IButtonControl Pin
leppie3-May-04 11:01
leppie3-May-04 11:01 
GeneralRe: IButtonControl Pin
K4reem4-May-04 3:06
K4reem4-May-04 3:06 
GeneralRe: IButtonControl Pin
Heath Stewart4-May-04 3:28
protectorHeath Stewart4-May-04 3:28 
GeneralRe: IButtonControl Pin
leppie4-May-04 6:52
leppie4-May-04 6:52 
GeneralUsing Viseme from sapi 5.1 Pin
pjaol3-May-04 10:51
pjaol3-May-04 10:51 
GeneralAdding HTML to the OE NewMessage Window Pin
ManjithMadhusudanan3-May-04 10:44
sussManjithMadhusudanan3-May-04 10:44 
GeneralCopy Portion of Bitmap Pin
Wackatronic3-May-04 9:50
Wackatronic3-May-04 9:50 
GeneralRe: Copy Portion of Bitmap Pin
Heath Stewart3-May-04 10:36
protectorHeath Stewart3-May-04 10:36 
GeneralRe: Copy Portion of Bitmap Pin
Colin Angus Mackay3-May-04 12:11
Colin Angus Mackay3-May-04 12:11 
Generalload crpe32.dll failed Pin
econnor3-May-04 9:40
econnor3-May-04 9:40 
GeneralRe: load crpe32.dll failed Pin
Heath Stewart3-May-04 10:35
protectorHeath Stewart3-May-04 10:35 
The has to do with the PATH environment variable, which Windows/Windows NT uses to find executables. If that directory is not in the PATH environment variable, then just specifying it like [DllImport("crpe32.dll")] will not work since it can't be found. Also, you should not hard-code this path in the DllImportAttribute because it may not be the same on every machine. Instead, in your installer add that directory to the PATH environment.

One other way is to use Environment.GetFolderPath with the Environment.SpecialFolder.CommonProgramFiles enum member to get the path to "\Program Files\Common Files" and use Path.Combine to append "Crystal Decisions\1.0\Bin", which should be the same in all cases (the "Common Files" directory is the last configurable directory for Windows in this case). You could then P/Invoke LoadLibrary, GetProcAddress, and FreeLibrary to load the proc address and execute it like a delegate (create a delegate with a matching signature).

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: load crpe32.dll failed Pin
leppie3-May-04 10:59
leppie3-May-04 10:59 
GeneralRe: How Do I Make a program to only execute once per session Pin
Dave Kreskowiak3-May-04 9:25
mveDave Kreskowiak3-May-04 9:25 
GeneralRe: How Do I Make a program to only execute once per session Pin
Dave Kreskowiak3-May-04 9:48
mveDave Kreskowiak3-May-04 9:48 
Generaldivil.co.uk's Document Manager. Pin
Marlun3-May-04 8:47
Marlun3-May-04 8:47 
GeneralRe: divil.co.uk's Document Manager. Pin
leppie3-May-04 11:15
leppie3-May-04 11:15 
GeneralRe: divil.co.uk's Document Manager. Pin
Marlun3-May-04 13:44
Marlun3-May-04 13:44 
Generalsp_helpfile Execute Pin
betterc3-May-04 8:45
betterc3-May-04 8:45 
GeneralRe: sp_helpfile Execute Pin
leppie3-May-04 8:57
leppie3-May-04 8:57 

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.