|
Use WaitForSingleObject(hProcess, ...)
|
|
|
|
|
Cris wrote: nt?
I need to know when a executing of a process has finished.
\
Is it your Own process or you want to wait for some foreign process!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
A foreign process, started by another app.
|
|
|
|
|
hi ,
i have a webbrowser application when i get any script error my application crashes and its closed
can i handle those scripting errors ?
thanks all
venu
|
|
|
|
|
debug your app and check for stack,if possible paste code which is causing problem.
Regards
Abhishake
|
|
|
|
|
How can be done file mapping into memory? I mean to read and use the contents of a file into memory. In VC++.
|
|
|
|
|
HANDLE hFile = ::CreateFile("MyFile.ext", GENERIC_READ, <br />
FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);<br />
<br />
HANDLE hMap = ::CreateFileMapping(hFile, NULL, PAGE_READONLY, 0, 0, NULL);<br />
<br />
LPVOID pvFile = ::MapViewOfFile(hMap, FILE_MAP_READ, 0, 0, 0);
<br />
DWORD dwFileSize = ::GetFileSize(hFile, NULL);
<br />
<br />
::UnmapViewOfFile(pvFile);<br />
::CloseHandle(hMap);<br />
::CloseHandle(hFile);
--
======
Arman
|
|
|
|
|
|
|
hi,
We use AfxMessageBox to display a string in a dialogbox.
How can we display an int data type in a dialogbox.
Thanks in advance,
Tejaswini
|
|
|
|
|
what about formatting a string and calling AfxMessgeBox with the string ?
int i = 42;
CString s;
s.Format( "The is an integer : %i", i );
AfxMessageBox( s );
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
You can use CString::Format or use itoa
whitesky
|
|
|
|
|
tejaswini.g wrote: We use AfxMessageBox to display a string in a dialogbox.
How can we display an int data type in a dialogbox.
wsprintf can help too
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi, I got the belowing code and I am not a C# programmer.I need to insert data what I get from pointer in Edit Box.I have that IDC_EDIT_VALUE Edit box is type CEdit and member m_value.
Please help me.
SafeArrayAccessData(sa, (void **) &bstr);
int nLines = sa->rgsabound->cElements; // number of lines
for ( int i = sa->rgsabound->lLbound; i < nLines; i++ )
// wprintf(L"%s", bstr[i]);
SafeArrayUnaccessData(sa);
|
|
|
|
|
Do you need to insert values to editbox?
whitesky
|
|
|
|
|
On that pointer I get some text, and I need to read text from that pointer and insert in editbox..
|
|
|
|
|
See Here[^] maybe it is some helpful to you
whitesky
|
|
|
|
|
miirsad wrote: I am not a C# programmer.I
bUT THIS is not C# forum!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hello,
When I'm running my project, I get an assertation message like you can see on the picture:
http://img82.imageshack.us/img82/9623/assertationerroreu6.jpg[^]
Here is a piece of code :
<br />
HWND CDataExchange::PrepareCtrl(int nIDC)<br />
{<br />
ASSERT(nIDC != 0);<br />
ASSERT(nIDC != -1);
HWND hWndCtrl;<br />
COleControlSite* pSite = NULL;<br />
m_pDlgWnd->GetDlgItem(nIDC, &hWndCtrl);<br />
if (hWndCtrl == NULL)<br />
{<br />
pSite = m_pDlgWnd->GetOleControlSite(nIDC);<br />
if (pSite == NULL)<br />
{<br />
TRACE(traceAppMsg, 0, "Error: no data exchange control with ID 0x%04X.\n", nIDC);<br />
ASSERT(FALSE);
AfxThrowNotSupportedException();<br />
}<br />
}<br />
m_idLastControl = nIDC;<br />
m_bEditLastControl = FALSE;
<br />
return hWndCtrl;<br />
}<br />
the line of the errer is bolded.
Do anyone know how to fix this problem?
Thanking you in advance!
SnaidiS(Semion)
|
|
|
|
|
I think pSite is null.Did you saw MSDN:
From the MSDN
ASSERT tests an expression. If the expression is false, it breaks into the kernel debugger.
whitesky
|
|
|
|
|
Thank you!
SnaidiS(Semion)
|
|
|
|
|
Right above the ASSERT, there is an explanation: you call one of the data exchange functions (DDX_... or DDV_...) with an ID of a control that doesn't exist.
Most likely, it did exist once, but was later removed from your resource file, and generated code was left behind...
-----------------------------
Get trial copy of FeinViewer - an integrated GDI objects viewer for Microsoft Visual Studio .NET 2005 (8.0) Visual C++ Debugger, and other convenience and productivity tools for Microsoft Visual Studio .NET at at www.FeinSoftware.com
|
|
|
|
|
Thank you!
SnaidiS(Semion)
|
|
|
|
|
HELLO,
I want to capt events wich are displayed in the windows event viewer ,
i don't know wich api can do that,
i tried to parse the AppEvent.evt file to read them but it was encrypted in a strange way.
who knows haw to capt these events??
|
|
|
|
|
See Here[^] maybe it is some helpful to you
whitesky
|
|
|
|