Click here to Skip to main content
15,887,596 members
Home / Discussions / C#
   

C#

 
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 
GeneralRe: sp_helpfile Execute Pin
betterc3-May-04 9:30
betterc3-May-04 9:30 
GeneralRe: sp_helpfile Execute Pin
Heath Stewart3-May-04 10:10
protectorHeath Stewart3-May-04 10:10 
GeneralRe: sp_helpfile Execute Pin
betterc3-May-04 10:50
betterc3-May-04 10:50 
GeneralRe: sp_helpfile Execute Pin
Heath Stewart4-May-04 2:44
protectorHeath Stewart4-May-04 2:44 
GeneralSOAP over SSL with Certificate Pin
christer_evenius@hotmail.com3-May-04 7:14
christer_evenius@hotmail.com3-May-04 7:14 
GeneralRe: SOAP over SSL with Certificate Pin
Henrik Stuart3-May-04 7:34
Henrik Stuart3-May-04 7:34 
GeneralRe: Newbie Webservice Problem Pin
mjmcinto3-May-04 6:45
mjmcinto3-May-04 6:45 
GeneralRe: Newbie Webservice Problem Pin
Heath Stewart3-May-04 10:29
protectorHeath Stewart3-May-04 10:29 
GeneralNewbie -- How to use multiple forms not MDI Pin
Daniel Stagg3-May-04 6:24
Daniel Stagg3-May-04 6:24 

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.