|
OK, if you decide to use precompiled headers, you need to either #include your precompiled header file in each source file, use a #pragma hdrstop directive, or disable pre-compiled headers for that file (in which case you should include any headers that you need for that source file).
I can't see why CoCreateInstance would still be undefined if you've included both windows.h and objbase.h . Have you defined _OBJBASE_H_ somewhere?
You could try using the /showIncludes option to the compiler to show which files are actually being included. I'm not sure if this option was available in VS.NET 2002. If objbase.h is definitely being included, try using the /P option (with /C to preserve comments) to generate a pre-processed output and check whether the declarations are being output.
As for your other problem, you need to provide a definition as well as a declaration for your GUIDs. For WMI, you can simply link to wbemuuid.lib .
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Adding wbemuuid.lib sorted it, thanks a million, your a star!
We have a mathematician, a different kind of mathematician, and a statistician!
|
|
|
|
|
how shall i add a toolbar to IE using MFC. is there any class available for that.
ComputerNewton
|
|
|
|
|
|
i had searched the entire MSDN. but hadnt found. i got it using WTL in Codeproject. but i want it strictly in MFC but not in wtl/atl/other.
how shall i get that
for that in msdn.microsoft.com i got something, which not working.
ComputerNewton
|
|
|
|
|
Hello,
I wrote applications that suppose to open automatically by the auto
play mechanism of the WinXP, I entered the correct values to the
registry and the application start ok.
The problem I have is that I get a message box with error every time:
'E:\ The device is not ready'
Any ideas what is the problem?
The Registry settings:
--------------------------------------------------------------------
[HKEY_CLASSES_ROOT\MyApplication]
@="ImageDownload"
[HKEY_CLASSES_ROOT\MyApplication\shell]
[HKEY_CLASSES_ROOT\MyApplication\shell\open]
[HKEY_CLASSES_ROOT\MyApplication\shell\open\command]
@="C:\\Work\\Private\\MyApplication\\Debug\\MyApplication.exe \"%1\""
[HKEY_CLASSES_ROOT\MyApplication\shell\open\ddeexec]
@="[open(\"%1\")]"
--------------------------------------------------------------------
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\MyApplication]
"Action"="MyApplication"
"DefaultIcon"="C:\\Work\\Private\\MyApplication\\Debug\\MyApplication.exe,0"
"InvokeProgID"="MyApplication"
"InvokeVerb"="open"
"Provider"="MyApplication"
--------------------------------------------------------------------
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\ShowPicturesOnArrival]
"MyApplication"=""
--------------------------------------------------------------------
|
|
|
|
|
Hi,
I am sorry, I do not have the answer to your question but another one with which you can help, I guess.
I just entered all the correct values into the registry, but my application does NOT start. Is there anything I have to do from within the application?
I verified my entries by starting another application, which works fine. But my own does not start at all. Any ideas?
Thanks,
Sathie
|
|
|
|
|
How may I lock the width on my CDialog. I’d like to size it only vertical
.....and justice for all
APe
|
|
|
|
|
Handle WM_SIZING . You can restrict the user's operation to allow sizing by a specific edge or corner only.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hi.
I want to do NAT Tunneling using NAT (network address translation)
protocol.
How can i do it in VC++
Means any one know about its commands etc.
Actually my server (private IP)is running on one LAN ( Public IP)
And Client(private IP) is Running on other LAN (public IP)
How can they communicate to each other ...
I Guessed that it is bcoz of NAT ..
But i not know about its Programming techniques
PLZ
Reply me
thanx
|
|
|
|
|
To get them to talk you have to change the firewall on the server side to forward a port to the server machine-- how you do this depends on your firewall.
|
|
|
|
|
Why this error comes?. is there any remedy for this?. can my application get relief from it, if i download VC6 service pack?.
ComputerNewton
|
|
|
|
|
You need to install the unicode version of your MFC lib which by default not set in your stardard installation.
Sonork 100.41263:Anthony_Yio
Life is about experiencing ...
|
|
|
|
|
hello all,
As mentioned in the MSDN, i had added "Shlwapi.h" and a library link "Shlwapi.lib". but the problem is that still my application is giving an error informing about the declaration of UrlEscape(...)
Error : UrlEscape undeclared identifier
how shall i fix this bug.
ComputerNewton
|
|
|
|
|
do you have platform sdk installed ?
greatest thing is to do wot others think you cant suhredayan@omniquad.com
messenger :suhredayan@hotmail.com
|
|
|
|
|
ohhh i dont know that i am simply using MFC Applications. how shall i install that?.
what ever the application i am using that is MFC based application in that i got this error. for this type of applications too i need platform SDK?. where shall i get the platform SDK.
ComputerNewton
|
|
|
|
|
|
Hi NewtonOfComputers, instead of statically linking to shlwapi.lib , you should consider dynamic linking instead, because UrlEscape function was introduced in version 5.00 of shlwapi.dll so it requires Windows 98 (or Windows 95 with Internet Explorer 5.0 or later) in your system. To make your code compatible with all Windows versions, do something like this:
#ifdef _UNICODE
#define szURLESCAPEFUNC _T("UrlEscapeW")
typedef LWSTDAPI (*URLESCAPEFUNC)(LPCWSTR, LPWSTR, LPDWORD, DWORD);
#else
#define szURLESCAPEFUNC _T("UrlEscapeA")
typedef LWSTDAPI (*URLESCAPEFUNC)(LPCSTR, LPSTR, LPDWORD, DWORD);
#endif
HMODULE hModShlwapi = LoadLibrary(_T("shlwapi.dll"));
if (hModShlwapi != NULL)
{
URLESCAPEFUNC pUrlEscFunc = (URLESCAPEFUNC)GetProcAddress(hModShlwapi, szURLESCAPEFUNC);
if (pUrlEscFunc != NULL)
{
(*pUrlEscFunc)(...);
}
FreeLibrary(hModShlwapi);
}
Gurmeet S. Kochar If you believe in God, it's because of the Devil
My CodeProject Articles: HTML Reader C++ Class Library, Numeric Edit Control
|
|
|
|
|
hello all,
As i am trying to add a toolbar to InternetExplorer from VC++ applications, i had downloaded the said component kbbar.exe from
http://support.microsoft.com/support/ kb/articles/Q246/2/34.ASP
But this file is giving so many errors. How shall i overcome these errors.
ComputerNewton
|
|
|
|
|
Is it possible to make a dialog only enable to minimize from the System menu?
.....and justice for all
APe
|
|
|
|
|
yes we can do that. for that u need to control the system menu. first get the handle of System Menu and start working as we used do in case of general menus concept.
ComputerNewton
|
|
|
|
|
Any tip how to get that handle?
.....and justice for all
APe
|
|
|
|
|
Found!!
GetSystemMenu(...)
.....and justice for all
APe
|
|
|
|
|
GetSystemMenu() is an API through which u can get the handle.
ComputerNewton
|
|
|
|
|
Hi
Can someone please help me with this.
Given the following->
Write a function called Copy, witch takes two parameters
of type string. The first par is your Source(string to be copied) second is your Dest string(target) this function need not return anything(NOT ALLOWED TO USE strcpy)
I need to show how i would use this function(call) by writing code that copy one string into another.
A deep copy should take place not Shallow.
How can i implement the following in my function
clear, erase, resize, append and index operator.
How does the following piece of code look?
#include <iostream><br />
#include <string><br />
<br />
<br />
using namespace std;<br />
<br />
void Copy(string * Source, string * Destination);
<br />
int main()<br />
{<br />
string Source = "Robile";<br />
string Destination = "Lance";<br />
Source.append(Destination);<br />
<br />
Copy(&Source , &Destination);<br />
<br />
}<br />
void Copy(string * Source, string * Destination)<br />
{<br />
cout << "Destination String Now is " << *Destination << "\n";<br />
}
Not asking for complete code just tips on what to do and
howto(Correction of code above)
Thanks in advance
|
|
|
|