|
Hi Bob
Thankx a lot to give kind attention to my question
I tried but it gives error at compile time if i use ABOVE_NORMAL_PRIORITY_CLASS flag, Instead if i use HIGH_PRIORITY_CLASS it works but it takes all the CPU and takes too long time to execute other processes....
What seems to be the reason that it gives error for ABOVE_NORMAL_PRIORITY_CLASS ? The error is :
"error C2065: 'ABOVE_NORMAL_PRIORITY_CLASS' : undeclared identifier"
Any idea what to do ?
Thankx
Amarelia Maehsh
Gujarat
India
|
|
|
|
|
Amarelia wrote: What seems to be the reason that it gives error for ABOVE_NORMAL_PRIORITY_CLASS ? The error is :
"error C2065: 'ABOVE_NORMAL_PRIORITY_CLASS' : undeclared identifier"
Are you on a Windows 2000 or XP machine? What is the value of _WIN32_WINNT ?
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Hi David
I am using Windows 2000
And not getting what do you mean by ,"What is the value of _WIN#@_WINNT?"
Thankx
Amarelia Maehsh
Gujarat
India
|
|
|
|
|
Amarelia wrote: And not getting what do you mean by ,"What is the value of _WIN#@_WINNT?"
I was going to suggest that it had to be greater than or equal to a certain value, but after looking in winbase.h, I see that is not the issue. I can only suggest that you verify the spelling of ABOVE_NORMAL_PRIORITY_CLASS .
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Hi
Amarelia Maehsh
Gujarat
India
|
|
|
|
|
Hi
Amarelia Maehsh
Gujarat
India
|
|
|
|
|
Good day,
How can I make transparency in CBitmapButton. I dont want to display image part with color RGB(255,0,255).
Thanks.
|
|
|
|
|
hi, everybody,
I create a WebBrowser control in a dialog, then i get a pointer to CWebBrowser2 which is named m_pBrowser, after that i use the "navigate2" to open some site. As the pages of the site contains many pictures, so the m_pBrowser alloc memory itself to get and display the HTML page.
but , after i use "m_pBrowser->DestroyWindow()" and "delete m_pBrowser" to destroy the control, m_pBrowser disappeared but the memory which was alloced by itself could not be freed. And the sizeof these memories is large, always larger than 20M.
How could i free these memories manual?
Thank all of you very much!!!
PS: i used the codes blow to create a WebBrowser control :
m_pBrowser=new CWebBrowser2;
m_pBrowser->Create("",WS_CHILD|WS_VISIBLE,rt,this,9000);
m_pBrowser->SetRegisterAsBrowser(FALSE);
m_pBrowser->SetSilent(TRUE);
m_pBrowser->ShowWindow(SW_SHOW);
|
|
|
|
|
Hello everybody,
Does anyone know ho can I terminate the sqlservr.exe process?
I tried the TerminateProcess() but it didn't work and I guess that it must be the child processes or threads that might be running with it.
So how can I terminate all the tree process?
Thanks in Advance!
sirtimid
|
|
|
|
|
sirtimid wrote:
I tried the TerminateProcess() but it didn't work...
Which means nothing unless you tell us why it failed? What does GetLastError() return?
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
This is the process that the MSSQLSERVER runs.
It returned 6 (The handle is invalid. - ERROR_INVALID_HANDLE)
I got the Process ID as shown below:
HANDLE hProcessSnap = NULL;
BOOL bRet = FALSE;
PROCESSENTRY32 pe32 = {0};
hProcessSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
if (hProcessSnap == INVALID_HANDLE_VALUE)
return FALSE;
pe32.dwSize = sizeof(PROCESSENTRY32);
if (Process32First(hProcessSnap, &pe32)) {
DWORD dwPriorityClass,excd;
BOOL bGotModule = FALSE;
bool found = false;
MODULEENTRY32 me32 = {0};
do {
HANDLE hProcess;
hProcess = OpenProcess (PROCESS_ALL_ACCESS | PROCESS_TERMINATE | PROCESS_QUERY_INFORMATION,
FALSE, pe32.th32ProcessID);
if(!memcmp(pe32.szExeFile,"sqlservr.exe",12)) {
bGotModule = GetExitCodeProcess(hProcess, &excd);
TerminateProcess(hProcess, excd);
err = GetLastError();
found = true;
} else {
found = false;
}
CloseHandle (hProcess);
} while (Process32Next(hProcessSnap, &pe32) && !found);
}
CloseHandle (hProcessSnap);
|
|
|
|
|
sirtimid wrote: hProcess = OpenProcess (PROCESS_ALL_ACCESS | PROCESS_TERMINATE | PROCESS_QUERY_INFORMATION,
FALSE, pe32.th32ProcessID);
if(!memcmp(pe32.szExeFile,"sqlservr.exe",12)) {
Shouldn't you be checking the return value from OpenProcess() before attempting to call memcmp() ?
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
It is probably a service that can be shutdown using the service manager.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Hi
I have used the BannerTester project given at
http://www.codeproject.com/staticctrl/bannerstatic2.asp
Here when I increase the size of the Font, it becomes very very slow speed.
I want to increase the speed of the text...is there any idea how to achieve it ?
Regards,
Mahesh
Amarelia Maehsh
Gujarat
India
|
|
|
|
|
Why don't you post the question on the 'forum' below the article ?
|
|
|
|
|
ohhhh i c...thankx a lot...
Amarelia Maehsh
Gujarat
India
|
|
|
|
|
|
hi,
Can you plz tell me how to Convert CString to LPCTSTR.
Thanks a lot.
|
|
|
|
|
this[^] is the only thing I can give now...
learn how to search the web and the msdn if your not satisfied
-- modified at 9:57 Wednesday 12th October, 2005
|
|
|
|
|
toxcct wrote:
CString str = "Hello World";
char* pc;
strcpy(pc, (LPCTSTR)str);
While I understand the intent of your code, there are two things wrong with it. First is that no memory has been allocated to pc . Second, the cast in strcpy() is not needed.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
I am really sorry Mr. toxcct. Usually i search for article and i search in forum. But this time i didnot find anything in message search (LPCTSTR and LPCSTR string miss match). And its my mistake that i just overlooked the thread below.
And i am happy that first reply of those threads posted by Rage helped me.
Thanks and Sorry
|
|
|
|
|
ok, no problem now...
what angry me the most is seeing that i am flamed when i'm trying to help someone...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
|
thanks !!!
i really can't understand people on the forum...
i've been vote down one more time while i gave the answer...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Well, if you are referring to your previous answer in this thread it could be the fact that the code you wrote will generate a compile time error.
You're suggesting assigning a 'const char*' to a 'char'.;)
On the other hand the answer should give the one asking the question the idea anyway, so I don't think it deserved to be rated '1'.
I'll rate it up for you a little bit, if you want.
--
Roger
|
|
|
|