|
Arman Z. Sahakyan wrote: get the HANDLE value returned from CreateProcess
CreateProcess returns BOOL value.
Arman Z. Sahakyan wrote: disable your current window content
Please tell me how to disable current window. That is what i want..
|
|
|
|
|
Shell32.dll wrote: CreateProcess returns BOOL value.
CreateProcess() also fills a PROCESS_INFORMATION struct which contains handles to the created
process and main thread (did you know you need to close those when you don't need them?).
You can use the hProcess member of that struct in a wait function.
Shell32.dll wrote: Please tell me how to disable current window. That is what i want..
EnableWindow(hwnd, FALSE)
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Shell32.dll wrote: Can anyone please tell me how to disable the first window until i click OK or Cancel of second window?
Lookup WF_CONTINUEMODAL and WF_STAYDISABLED .
There is an example of the usage of this flag in CDocument::OnFileSendMail .
|
|
|
|
|
hi all,
I have a dll in my hand that contains a class with many member functions. How can I import that class in my application , create object of that class, and invoke its functions.
I know how to use LoadLibrary() and GetProcAddress(), to import global functions in a dll. but for accessing class inside dll, seems difficult,
Pls give a help
Thanks in advance.
SYAMLAL
|
|
|
|
|
Do you need run-time dynamic linking?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
|
Additional to what others wrote:
Using __declspec(dllexport) /__declspec(dllimport) with C++ classes worked for me. However, consider writing a plugin system for your application. Each plugin could be a C++ class derived from a plugin interface (pure abstract class), this one-time extra work allows you to reuse your plugin system for any functionality. Alternatively use COM.
Hope it helps.
|
|
|
|
|
|
|
i am having an exe. how to find the path for it.
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
Its your program or another program that is running? see is GetModuleFileName helpfuls?
|
|
|
|
|
You can use GetModuleFileNameEx [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
deeps_cute wrote: i am having an exe.
How are you executing it? Where did you get it from? And what does it do?
deeps_cute wrote: how to find the path for it.
Is it some third party application?
Or is it your own application that you need to find the path for?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
its an exe downloaded from a package. i have to get the path
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
_AnShUmAn_ wrote: Where did you get it from
Maybe its a secret
|
|
|
|
|
actually i will install an exe say somexx.exe through a package. i have to update it whenever in need. but the user can install it in any of hos specified path. now i have to get the path for somexx.exe.
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
The application would be creating an entry somewhere in the registry at a fixed location at the time of installation. You should search it out. By reading the entries in registry it would be possible for you to get the path of the "somexx.exe"
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
At the time of installation there would be a key created in the registry at some fixed location. You need to search it out and then read the registry to get the path of the exe.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
If he runs exe file you can use of EnumProccess for get name and path of file MSDN has this example see this function on the MSDN "Enumerating All Modules For a Process"
|
|
|
|
|
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
The program fail at line 177 of afx.inl file.
_AFX_INLINE TCHAR CString :: operator[](int nIndex) const<br />
{<br />
ASSERT(nIndex >= 0);<br />
ASSERT(nIndex < GetData() -> ndataLength);
return m_pchData[nIndex];<br />
}<br />
Please give me some idea for solve this problem
|
|
|
|
|
You went out of the buffer upper boundary. Check the code calling the CString::operator[] .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Run the program under the debugger, and when it hits the assert, open the stack trace window, and see where in your code it stopped.
|
|
|
|
|
Hi,
if you are accesing the CString with [] operator, try to make it in the right borders. For example:
for (int i = 0; i < str.GetLength (); i++)
{
//do what you want
}
with this you will stay allways in Strings' limits.
return of GetLength () - 1 = max_position of the operator [] allowed
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
Dear friends
i created a project using vc++ 2005 under vc++ 2005 express edition, when i wanted to add a form, pc showed me : you are adding a CLR component to a native project.your project will be converted to have common language Runtime support." then after i built my project, it failed. help me to solve this issue. thanks all
Li Zhiyuan
5/10/2006
|
|
|
|