|
Hmm, because you didn't tell what the problem is, it's kind of difficult to know why it doesn't work. However there's a memory leak: a new Foo object is created for each row in the file, but you only delete it once. What's the point of having a dynamic Foo BTW? Also, IMHO its bad practice to mix malloc/free with new/delete.
|
|
|
|
|
Hey guys
How do you launch an application from c++ i know u can use shellexecute but this uses the default program is there a way to launch a program from your program. Basically i am writing a program that needs to copy a file then launch regsvr32.exe to register this dll.
Cheers
Peter
|
|
|
|
|
Couldn't you do a:
ShellExecute(NULL, NULL, _T("regsvr32.exe yourdll"), NULL, _T("C:\\WINNT"),SW_SHOW);
not sure why you want to get away from ShellExecute.
Rob
|
|
|
|
|
Cheers didn't know you could do that.
|
|
|
|
|
CreateProcess() will also do what you want.
--CoolDev
|
|
|
|
|
The ANSI C way (according to MSDN) is to use system() .
|
|
|
|
|
Hey Guys
Sorry but i got yet another question. What would be the easiest way to copy a file from one place to the other without copying the file attributes.
Peter
|
|
|
|
|
|
how do you link to a web page in a MFC dialog program?
|
|
|
|
|
You mean create a link you can click on ? Create a static, and when the user clicks on it, use ShellExecute with the link as the property and no path, it will run in the default browser.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
did that... didn't work - pretty sure i messed up somewhere.
could you provide an example for me?
|
|
|
|
|
If you took the time to log in then I would have got an email to say you'd replied and gladly done so. It appears another solution has been offered in the meantime.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
sorry i don't have an account.
but - thanks for your time.
got it to work now.
|
|
|
|
|
Look on this site for the CHyperlink class. Trivial once you add that to the project.
|
|
|
|
|
sweet thanks for help.
got it to work.;)
|
|
|
|
|
Hey guys
Is there away to detect the standard windows\system directory for an OS. becuase windows and winNT based systems have different paths ie winnt is \winnt\system32 and windows is windows\system32 or it could be completly diffrent if the user choose to install windows to a different directory.
|
|
|
|
|
::GetSystemDirectory
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
Hey Guys
Another question
How do i get the handle to module in an executable i tried _Module.GetInstance() but it just through up errors. Saying that it was an undeclared identifier.
I need the handle so i can use loadstring.
Cheers
Peter
|
|
|
|
|
GetModuleHandle(NULL) will return the handle of the calling process
Nish
Sonork ID 100.9786 voidmain
|
|
|
|
|
That Doesn't want to work either
i keep getting the error _Module is an undeclared identifier.
|
|
|
|
|
|
Hey Guys
What the quickest way to detect which windows version it is in c++.
Peter
|
|
|
|
|
GetVersionEx
Nish
Sonork ID 100.9786 voidmain
|
|
|
|
|
Use the OSVERSIONINFOEX structure with ::GetVersionEx() .
Jon Sagara
"After all is said and done, usually more is said than done." -- Unknown
|
|
|
|
|
Anyone who knows?
OBS! I'm not interested in the drive letters, only physical drives.
|
|
|
|