|
While using ShellExecute(0, _T("open"), _T(strUrl.c_str()), 0, 0,SW_HIDE);
explorer is displayed with balnk page even with SW_HIDE
any idea friends
|
|
|
|
|
And the Result is? Greater than 32?
If not, did you check it with the Documentation of ShellExecute?
nShowCmd: If lpFile specifies a document file, the flag is simply passed to the associated application. It is up to the application to decide how to handle it.
So, it seems your URL-Handling application decides to open a window on error.
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
While it has nothing to do with your problem, the _T() macro is intended for use with string literals.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi!
i wrote an application in visual C++ 7, where i load the msado15.dll statically in header file with #import ... from this path:
C:\Program Files\Common Files\System\ado\msado15.dll
but when i want to run my application in computer that windows installed on D drive and msado15.dll path is:
D:\Program Files\Common Files\System\ado\msado15.dll
my application can not connect to database, how can i load the dll correctly indipendent of windows installed drive?
modified on Monday, March 10, 2008 9:37 AM
|
|
|
|
|
Oh with #import directive ... Forget my previous reply below.
Try SHGetSpecialFolderLocation with the argument CSIDL_PROGRAM_FILES_COMMON to get where the "N:\Program Files\common files " is.
Maxwell Chen
modified on Monday, March 10, 2008 10:49 AM
|
|
|
|
|
the word color of a disabled CEdit is gray.
I created a new class as "CColorEdit" and handled ON_WM_CTLCOLOR_REFLECT message,
I only could change the background color of the disabled CEdit control.
The word color was always as same as the disabled color.
How can I change the word color of a disabled CEdit control??
|
|
|
|
|
Hi all,
To register my VB ActiveX dll using the command "regsvr32 mydll.dll", I dont wanna run this command through a command prompt. Instead i want to run this command from a VC++ Win32 Console application.
The situation is that, I am making use on one VB ActiveX dll in one of my Win32 console applications. Now I want to know if there is any idea you guys could suggest me on how to run the regsvr32 command from this project. Say is there a way I could add a .bat file to the project which has this command? Hope I am clear in my problem.
Regards
Swapna Reddy
|
|
|
|
|
In general, you can do those kind of things with an installer. I heard that InnoSetup[^] is quite good (plus it's free).
|
|
|
|
|
Thanks for the reply.I was wondering if there could be any problem when i try running it on some other machine other than what i would be using where i would have registered the dll. Something attached as a part of the project. Like i mentioned in my first post,a .bat file which has shell commands or an option provided in the IDE itself which probably i was not able find out.Guys is that possible?
|
|
|
|
|
may be the previous similar thread helps register dll programmatically[^]
if you used commands on IDE, it is useful in the development machine. If you have so many files installation projects will help.
|
|
|
|
|
DLLServerRegister() will register the DLL but am not sure how it is used. According to me , It cannt be used to register VB ActiveX dll. If it is possible to register Visual Basic ActiveX dll using DLLServerRegister(), then please let me know.
Regards
Swapna
|
|
|
|
|
Did you read the complete thread, it ends with the CreateProcess() usage with regsvr32 command. COM DLL should behave same which developed in any language, so i think DLLServerRegister() will work. You can replace createprocess with shellexecute also.
|
|
|
|
|
That's the main reason why people use instalation products. So that they can register their dll, install MFC libraries, register the program in the registry,... All of that using a simgle executable.
Did you look at the link I gave you ?
|
|
|
|
|
Hey dude...
I tried creating a setup using Inno Setup.
I was able to create the setup successfully. I installed the setup too.My application makes use of a VB dll.The final GUI has a button when clicked will make use of a function in that dll. Now when i tried to click that button after installing the setup, I got an error CoCreationFailed. It usually comes when the dll is not registered. I registered the dll from command prompt and tried opening the same installed exe, it worked. So do you think Inno Setup actually helped me in solving that problem?
Well, the Visual Studio Installers provided on MSDN dont support Windows XP. Please correct me if I am wrong. I have decided not to give up on this problem since I believe there would be some way out to this.Please give me all your ideas possible. I would try them and let u know.
Thanks
Swapna
|
|
|
|
|
I don't know what you did with InnoSetup but you have to actually specify that it needs to register the dll. Did you do this.
I won't be able to help you much here because I didn't use it before but that's definitely something that is possible with it. Did you check their documentation ?
|
|
|
|
|
Hey dude....
Firstly.. i will try to explore if thats possible with Inno.
Ya.. I tried to explore the VC++ IDE and found that theres an option called as Pre-Link commands. Alright heres how you reach there
Project->Settings->Pre-link step->
Under Pre-link Commands(s)
Add this command : regsvr32 .\my_dll.dll
Click ok.
Save the project and try to rebuild etc. If everything is fine, you get a msg saying my_dll.dll registered succedeed.
Now, .\ in the above line asks the compiler to find the dll in the application directory. Which is the usual practice. You can specify, the path instead but hat would be less portable.
One disadvantage with this method is that every time you run the exe, the dll is registered. Well, thats how i could find a way to register a dll within the project though not programmitically.
This for your information:
regsvr32 /u /s .\my_dll.dll
regsvr32 .\my_dll.dll
You can find something like this too. I am not sure what does it mean.
Thanks to all.
Regards
Swapna
|
|
|
|
|
Are you in need of ShellExecute()[^]?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Are you using VS6? If so, it's easy to configure the IDE to do this (it's probably just as easy with VS200x, but I don't use that one).
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi...
am doing camera capture application.
my program is running in DEBUG mode.
but it does noy run in the RELEASE mode.
my code is,
"HRESULT hResult;
SHCAMERACAPTURE shcc;
ZeroMemory(&shcc, sizeof(shcc));
shcc.cbSize = sizeof(shcc);
shcc.hwndOwner = hwndOwner;
shcc.pszInitialDir = TEXT("\\My Documents");
shcc.pszDefaultFileName = TEXT("test.jpg");
shcc.pszTitle = TEXT("Camera Demo");
shcVideoTypes = CAMERACAPTURE_VIDEOTYPE_MESSAGING;
shcc.nResolutionWidth = 176;
shcc.nResolutionHeight = 144;
shcc.nVideoTimeLimit = 15;
shcMode = CAMERACAPTURE_MODE_VIDEOWITHAUDIO;
hResult = SHCameraCapture(&shcc);
if (S_OK == hResult)
{
StringCchCopy(pszFilename, MAX_PATH, shcc.szFile);
}
return hResult;"
whats the problem here?
what can i do for run in the RELEASE mode?
thanks.
regards,
Paulraj.G
paulraj
|
|
|
|
|
(1) As usual suggestion, see [^].
(2) What is the error in Release build?
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
The release build has "problem".
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
there is no error.
i wrote this code in a button event.
no reaction there...
paulraj
|
|
|
|
|
Are you sure the code is not failing somewhere else? Tried putting a message box within your function?
Also, if (S_OK == hResult) is this condition evaluating to true?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
ya i tried...
its working correctly in debugging mode.
paulraj
|
|
|
|
|
I was asking you to check what is going on in the release mode.
Additionally, if you can't describe your problem precisely, you'll find it very hard to get any useful reply.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|