|
doesn't work....
any other suggestion? anyone else?
thanks
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
I'm not sure if this is what the problem is as everything else looks ok, according at MSDN if your using using the si.wShowWindow property you need to set si.dwFlags to STARTF_USESHOWWINDOW else it'll just ignore it.
Out of interest have you tried changing it to launch Word or something to check the code is working ok?
Gavin Taylor
w: http://www.gavspace.com
|
|
|
|
|
also tried it (the STARTF_USESHOWWINDOW ) and still not working...
I tried creating process of notepad.exe and it works 100%!!!
i think the problem is the environment while i create ACDSEE 6 process...because it works fine with ACDSEE 3....not sure why though....
any thought?
thanks again
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
What does GetLastError() tell you?
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
i've managed!
please see my other reply that summarize it all
thank you my friend
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
Two potential reasons:
1) the lpCommandLine parameter of CreateProcessW() is the white-space delimited list of arguments passed as argv to the new process. If ACDSee expects to find the path to its own executable in argv[0] the above would fail, as your path contains whitespaces. Basically the result of the above would be: argv[0]="C:\Program", argv[1]="Files\ACD", argv[2]="Systems\ACDSee\6.0}ACDSee6.exe"
You should quote the string, e.g. pass it as:
L"\"C:\\Program Files\\ACD Systems\\ACDSee\\6.0\\ACDSee6.exe\""
2) The UNICODE-Version of CreateProcess() may fail on NT/2k/XP if the parameter passed as lpCommandLine points to a constant string. This is explicitly mentioned in MSDN. Note that the type is LPWSTR , not LPCWSTR . Maybe you should copy your string to a modifiable buffer and pass this buffer to CreateProcessW() :
I usually pass NULL for the lpApplication parameter and only use lpCommandLine . Of course, you have to make sure that a path containing white-spaces is quoted in this case (as described above). ShellExecute() is intended to be more "user friendly", that is it applies some heuristics to resolve pathes containing white spaces and does other "magic stuff".
Hope that helps
--
Daniel Lohmann
http://www.losoft.de
(Hey, this page is worth looking! You can find some free and handy NT tools there )
|
|
|
|
|
Thanks for all the replies!
i've managed...the problem was that when creating acdsee6 process, you need to set up the acdsee environment (because it loads some dll that are located else where) so you can get the environment out of the registry and then use the 'SetEnvironmentVariable' method
this works 100%....
to discover that, i needed to hook the ShellExecute method, and learned that it calls CreateProcess behind the scenes, with the necessary paramters that one of them was the environment looking at the memroy of that variable, i've seen the acdsee directory reference (the one that the dll reside)...
so mission completed
thanks again
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
hi,
I have built dialog based application and I would like to do print support there. Just picture from file or dc. It's MFC app but I can not figure out
how to get CDC for printing. Could someone give me some idea. Thanx
viliam
|
|
|
|
|
Does this help?
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
The only examples I have found are for VS C++ 6.0; e.g. Circle, Button, CIRC1/2/3 etc.
Are they any articles/tutorials for VS .Net as the Wizards hav gone on .Net
Cheers,
|
|
|
|
|
Is it possible to use the DeviceIoControl() function to send commands directly to the driver for a COM port?
I am developing a time sensitive serial port application where I periodically need to change the parity of my serial data. Calls to Get_Comm_State() & Set_Comm_State() to update the parity are taking too long. I observed (using a serial port monitor) that these get and set methods do alot of unnessecary things like seting the baud rate etc.
It would be nice if I could use the DeviceIoControl function along with the IOCTL_SERIAL_SET_LINE_CONTROL command (or similar) to quickly change the parity from within my application. Am I living in a fantasy world or is this a possibility?
Many thanks
B_B
|
|
|
|
|
Hi all
I have an application window, which is created as
a child to the IE window(i'am using the Findwindow and SetParent API's
to set it as child to IE) which is working fine.
My problem is when ever the child window is minimized, it is displayed
in minimized state with in the IE window, but my requirement is to display
it on the TaskBar.
I tried to set the style of the window to WS_EX_APPWINDOW but it works
only for unowned windows.
is there any way to make it appear on the taskbar.
thanks and regards
pradish
|
|
|
|
|
Hi all
Does VC 2005 Beta version Support MFC,i have downloaded the beta version but there is no support 4 MFC ,not even header files, could anyone tell me the reason.
Thanks
|
|
|
|
|
The beta version is a beta of the Express edition. In the Express edition there is no suppport for the MFC and the ATL. Simply.
|
|
|
|
|
Hi ,
I have developed a VC++ 6 application under WINXP . But the platform where this application will run use Windows 2000. And under winodws 2000 when i ran this application it gave me this error ;
"The procedure entry point Rtllpv4StringToAddressW could not be located in
the dynamic link library ntdll.dll."
I have copied all the required dlls in win2k machine (by using Depends.exe tool, I copied my WINXP dlls) , but still getting the same error. I have also tried to copy the NTDLL.DLL of windows 2000 , but same error .
Can please anyone help ... ?
Regards,
ZINC
ZINC
|
|
|
|
|
You should not be redistributing DLLs from your Windows XP system directory. Windows 2000's Windows File Protection should actually be kicking in when you attempt to do this. Instead, you should use the Merge Modules that match your Visual Studio service pack version. Download for SP5[^], download for SP6[^]. Note that there are known issues[^] in these merge modules.
You need to be very careful about which file versions you copy to which operating systems, and how you get them there. The merge modules include (mostly) correct instructions for which files to install on which systems. If you're not using Windows Installer you may want to look for redistributable package installers which you can run from within your own installer. Getting it wrong can screw up your customer's whole system ('DLL Hell').
I would strongly recommend avoiding the Visual Basic 'Package and Deployment Wizard' (which I refer to as the 'Package and Destroy Wizard'). This tool regularly picks up DLLs from the Windows system directory rather than the Redist directory it's supposed to (default location: C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\Redist) and also picks up many components that should not be redistributed. It can be used safely but is very hard to do so.
These days I generally use Visual Studio .NET 2003's setup projects to distribute applications, using the merge modules for distributing components I depend on, modified as instructed by the InstallSite page I linked to earlier.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Hi All
I am taking backup of Registry keys by using regedit command and, ShellExecute( ) is used to run this command from MFC based application, the code that I am using is as follows
<br />
<br />
ShellExecute(0,"open","RegEdit.exe","/e D:\\write1.reg HKEY_CURRENT_USER\Software\Microsoft\Windows NT",NULL,SW_SHOW);<br />
"Suppose that I have to take the backup of following key
HKEY_CURRENT_USER\Software\Microsoft\Windows NT
But this is not saved at desired path,
Caz, as I think there is a space in Windows NT .
So please suggest me that how shoul I remove this problem.
one more thing registry keys with no space in name is saved successfully.
Pls help me.
Thanks
Edit/Delete Message
|
|
|
|
|
You may use the standard registry operation functions to open and read data.
I am not sure if these are correct, I do not have MSDN installed on this machine, but I have worked a lot on dealing with windows Registry. I believe the following are the functions.
<br />
RegOpenKeyEx<br />
RegQueryValyeEx<br />
RegSetValueEx<br />
I would suggest you open the key, read value, and write it into a text file in BINARY MODE.
Hope this helps. If you need more information about how to do this, just write back a word.
Regards,
Rajesh R. Subramanian
Akruti Software,
Bombay, India.
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
|
|
|
|
|
rajeevktripathi wrote: ShellExecute(0,"open","RegEdit.exe","/e D:\\write1.reg HKEY_CURRENT_USER\Software\Microsoft\Windows NT",NULL,SW_SHOW);
Use this instead:
ShellExecute(0, "open", "RegEdit.exe", "/e D:\\write1.reg \"HKEY_CURRENT_USER\\Software\\Microsoft\\Windows NT\"", NULL, SW_SHOW);
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
<br />
ShellExecute( 0, TEXT( "open" ), "RegEdit.exe", "/e d:\\write1.reg \"HKEY_CURRENT_USER\\Software\\Microsoft\\Windows NT\"", NULL, SW_SHOW);<br />
Only difference is that I've wrapped the registry key in quotes, if you dont RegEdit will try and treat the key name as part of the export filename
Gavin Taylor
w: http://www.gavspace.com
|
|
|
|
|
Hi Brain,
Your tutorial about dcom in code project website is more
useful,Iam able to understand the concept easily upto step 6 , when i tried
your sample in a stand alone machine both client and server application
works properly,But at the same time when im trying it from a remote machine
it is not working can you please help me with your reply im getting a error
like this "unable to access rpc IHelloWorld " i followed all the steps what
you have said to follow.wait for your reply
sarvendu
active member
|
|
|
|
|
Have you posted this comment to the article itself? The author may be able to help.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
yup.
i need a help.
plz send me.
sarv
active member
|
|
|
|
|
sarvendu wrote: yup.
Where is the article you posted to?
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Hi Brain,
Your tutorial about dcom in code project website is more
useful,Iam able to understand the concept easily upto step 6 , when i tried
your sample in a stand alone machine both client and server application
works properly,But at the same time when im trying it from a remote machine
it is not working can you please help me with your reply im getting a error
like this "unable to access rpc IHelloWorld " i followed all the steps what
you have said to follow.wait for your reply
active member
|
|
|
|