|
Hi all,
I want to get through a proxy server which needs NTLM authentication.
I want to know the following:
1) Username and password (IE and FF can do this without interacting with the user)
2) How to set up the headers
I am using WinInet (CInternetSession).
Thanks!
Geert
http://geert.yoki.org
|
|
|
|
|
HI
I am getting an application path from file.
and i have all the dll in the folder named component.
for eg, C:\Program Files\Demo\Components and i am retreiving dll one by one and formed the new string
for eg. str="regsvr32 /u " +"C:\Program Files\Demo\Components\demo.dll";
and i am passing it to ShellExecute but it does not work what should i do or which function should i use.
Cheers
|
|
|
|
|
To load and unload libraries use LoadLibrary and FreeLibrary functions.
|
|
|
|
|
i want to unregister the dll freelibrary will just free the library after use.
thanx for replying.if you have any other solution please reply
cheers
|
|
|
|
|
Anonymous wrote:
str="regsvr32 /u " +"C:\Program Files\Demo\Components\demo.dll";
make is something like this
CString str="regsvr32 /u " +"C:\\Program Files\\Demo\\Components\\demo.dll";
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Anonymous wrote:
for eg. str="regsvr32 /u " +"C:\Program Files\Demo\Components\demo.dll";
There are few problems with the code.
1. You are trying to pass the parameter along with the exe name, which is not suggested.
so make two strings like :
string sFile(_T("regsvr32"));
string sParam(_T("/u \"C:\\Program Files\\Demo\\Components\\demo.dll\""));
2. Also note the dll path wrapped with double quote above.
Now call
::ShellExecute(hWnd,_T("open"),sFile.c_str(),sParam.c_str(),0,SW_SHOW);
suhredayan There is no spoon.
|
|
|
|
|
i am not able to use getvolumeinformation in my vc++ code.
can u give me one example how to i use getvolumeinformation in my code
|
|
|
|
|
|
aloktambi wrote:
can u give me one example how to i use getvolumeinformation in my code
See here.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hello everybody. I have a problem with the handles used by one of my samples.
A sample code is:
do<br />
{<br />
WriteXML(); <br />
Sleep(1000); <br />
}while (1); <br />
In the WriteXML method I write a string into a file a file using CStdioFile. The code is working well but I have noticed that the handles used by my application are continuously growing. I use the handle.exe utility from Sysinternals in order to track the handles and almost all of them are used by File.
After that I have implemented a new WriteXML method which is using the CreateFile, WriteFile and CloseHandle methods and the same result. The handles are still continuously growing.
Anyone has any idea how I can solve this issue?
Thank you
|
|
|
|
|
Handle leak occours only if you don't close any opened handle. Without seeing your code its difficult to say where is the problem.
suhredayan There is no spoon.
|
|
|
|
|
Thank you for your reply.
Here is the code used for writing the log now:
HANDLE hFile = CreateFile(FilePath.GetBuffer(), <br />
FILE_ALL_ACCESS, <br />
0, <br />
NULL, <br />
CREATE_ALWAYS, <br />
FILE_ATTRIBUTE_NORMAL, <br />
NULL); <br />
DWORD dwBytesWritten; <br />
WriteFile(hFile, <br />
m_szToWriteData.GetBuffer(0), <br />
m_szToWriteData.GetLength(),<br />
&dwBytesWritten, <br />
NULL); <br />
CloseHandle(hFile);
I do call CloseHandle(hFile) but if I check the handle count they are always increasing with 1 each time I do log into the file.
|
|
|
|
|
I believe that you should call CString::ReleaseBuffer after having used CString::GetBuffer (Check in MSDN for confirmation) Of course it has nothing to do with files, and I don't know if this may cause the loss of handle resource you are talking about. Actually I don't know what happens really when one forgets to call CString::ReleaseBuffer (memory leak ?) Maybe someone can help overthere ?
|
|
|
|
|
Thank you for your reply.
I have tried to use ReleaseBuffer but no luck. I think that ReleaseBuffer it might cause memory leaks (as you have mentioned) but is not related with the continuously growing of handles - which is the my main problem.
Anything else that I can try.
Thank you.
|
|
|
|
|
For what you are doing, GetBuffer() is not necessary. Remove it.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
micutzu wrote:
Anyone has any idea how I can solve this issue?
What makes you think there is an issue? How do you know that the handle count is not simply a high-water mark?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Well I am using the handle.exe utility from Sysinternals in order to track applications performances and handle usage seems an extremely important issue for me.
Here is a sample of the log generated by handle.exe
748: File C:\samples\Logs<br />
74C: File C:\samples\Logs<br />
750: File C:\samples\Logs<br />
754: File C:\samples\Logs<br />
758: File C:\samples\Logs<br />
75C: File C:\samples\Logs<br />
760: File C:\samples\Logs<br />
764: File C:\samples\Logs<br />
768: File C:\samples\Logs<br />
76C: File C:\samples\Logs<br />
770: File C:\samples\Logs<br />
774: File C:\samples\Logs<br />
778: File C:\samples\Logs<br />
77C: File C:\samples\Logs<br />
780: File C:\samples\Logs<br />
784: File C:\samples\Logs<br />
788: File C:\samples\Logs<br />
78C: File C:\samples\Logs<br />
790: File C:\samples\Logs<br />
794: File C:\samples\Logs<br />
798: File C:\samples\Logs
And since the logging operation is done each second than the amount of extra handles per minute is 60. Considering this I thing that the handle count is an issue.
Thank you for your comments.
|
|
|
|
|
Hi,
I want to display a grpah in a dialog according to the data input from user. A two cordinate graph with markings at specific points according to user's input.
Which way to go ?? ActiveX ??
- KK
- KK
|
|
|
|
|
|
hiho@ll
i try to prog an updateclient, which gets updates from a server
i want this client to be as generous as possible
that means it should work for nearly every programm
to do this i thought about, calling my update client
the updateclient checks who called it, kills the app, updates the app, starts the app again, and shutdown itself
my problem is:
how does the client knows who started him?
how can the client kill the mother app?
how can the client know which file to execute, to start the app?
i could all do this with command line parameters, but is there a "windows" way to do this?
thx@ll
|
|
|
|
|
Came accross this [^] article, don't know how good is it.
suhredayan There is no spoon.
|
|
|
|
|
Hi to All,
I want some help from anybody. I am working on a client server application; the requirement is like this: the client application should have a look & feel of MSN messenger. I mean, I want to create the dialogue or the tab-buttons as we are seeing in MSN messenger. But, I am confused whether I can use vc++ for the same or not, or do I need to use .net. & Also the application should be easily downloadable; I mean the size of the application should be less.
I want some suggestions on the same. Is MSN user interface is built with VC++ or any other language? Thanks in advance
|
|
|
|
|
kalicharan wrote:
or do I need to use .net. & Also the application should be easily downloadable
if you use .net then you application will be windows nt specific!
kalicharan wrote:
I want to create the dialogue or the tab-buttons as we are seeing in MSN messenger
you have to skin your control, there are dozens of example on cp relating to it!
here,
http://www.codeproject.com/dialog/[^]
kalicharan wrote:
Is MSN user interface is built with VC++ or any other language? Thanks in advance
yeah you can try vb for building UI fast!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Would somebody help me please do something in c++ step by step ?
I want to get info. of currently active application: pid and name
By active i don't mean the same application that wants to know
the info.
Example:
from my application i want to know if notepad is currently active
and somebody is writing txt..
REPORT
1/we have wo running applications = myapp and notepad
2/alt tab to myapp
3/status report in my application = myapp is focused
4/alt tab to notepad
5/status report in my application = notepad is focused
6/writing text in notepad
7/status report in my application = notepad is focused
8/status report in my application = event key pressed
|
|
|
|
|
This may help:
[GetForegroundWindow ]for getting handle of application which currently have Keyboard focus
[GetWindowText ] retrieve the Caption Text associated with Windows handle
[GetWindowModuleFileName ] return with the path of application!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|