|
I think you may want to call CoCreateInstance()
Waldermort
|
|
|
|
|
Unless he modified his post, that function is being called.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I have written an ATL COM server in a DLL with merged proxy/stub using Visual Studio 2005. It can sometimes be used locally and other times remotely. Deploying locally is straightforward and I've now got a client using it that way. However I've been wading through all sorts of internet articles, discussions etc. about how to deploy, debug, and use the component remotely, but to no avail.
I need to be able to deploy and debug on a remote machine via peer-to-peer and/or ethernet switched networks, including guidance on how to configure the security correctly on Windows XP Prof. with SP 2. I've got to believe that somewhere there is a 'step by step' guide on how to do this, but I haven't found one yet.
Please can anyone help?
Thanks.
|
|
|
|
|
Hey all,
I have to validate the path of a directory i.e the directory path is valid or not.
pls help me.
Regards,
Pankaj Sachdeva
"There is no future lies in any job"
"but"
"future lies in the person who holds the job"
|
|
|
|
|
PathIsDirectory() Perhaps next time you could look in the documentation[^]
Waldermort
|
|
|
|
|
Interesting...
How you discover that that's the function?
By reading all the 10000 pages in strict alphabetical order?
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
It doesn't take much effort to type into that little box they call "Search" and then click the button called "go"...
Waldermort
|
|
|
|
|
in theory yes, but with the new MSDN it becomes a nightmare...
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
Then I suggest you download[^] a copy
Waldermort
|
|
|
|
|
emilio_grv wrote: By reading all the 10000 pages...
No, just the ones up to the function that you are interested in. All the pages after that do not need to be read, unless you just wanted to.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi, here is another option
BOOL IsDirectory(TCHAR *szPath)
{
BOOL bRet = FALSE;
DWORD dwResult = GetFileAttributes(szPath);
if(dwResult != 0xffffffff && (dwResult & FILE_ATTRIBUTE_DIRECTORY))
{
bRet = TRUE;
}
return bRet;
}
Best Wishes,
-Randor (David Delaune)
|
|
|
|
|
DWORD dwFileAttrib = 0;
dwFileAttrib = GetFileAttributes(pathof Directory);
if(dwFileAttrib == -1 || (dwFileAttrib & FILE_ATTRIBUTE_DIRECTORY) == 0)
{
AfxMessageBox("Directory path not exist");
}
kamalesh
|
|
|
|
|
Karismatic wrote: I have to validate the path of a directory...
What does "validate" mean? Are you wanting to check if it has invalid characters, or whether it exists?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi All,
I have an application in which i need to know when the user has plugged in or plugged out the ethernet cable to the system.
I have the adapter information within my application.
I tried using the device change notification with Registering the notification giving the guid for lan class. But this helps only when i either enable or disable the land adapter from my device manager.
Please help or provide pointers to some link.
Thanks in advance.
Sunil
|
|
|
|
|
Does this help any? What about the ISensNetwork interface?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi all,
The Id IID_IConverterSession appears as unresolved external symbol how did that happen? Plus can anyone help me get my code right i am a super beginner at this.
Many thanks,
Jj
HRESULT hResult;
WORD wKey = 0;
LARGE_INTEGER liZero = { 0 };
LPSTREAM pTNEFStream = NULL;
LPITNEF pTNEFObj = NULL;
CLSID clsid;
LPMSGSESS pMsgSession = NULL;
IMalloc *m_pMalloc;
IStorage *pStorage = NULL;
MAPIINIT_0 MInit;
MInit.ulVersion = MAPI_INIT_VERSION;
MInit.ulFlags = 0;
hResult = MAPIInitialize(NULL);
if (hResult !=S_OK){
throw(HResultException("MapiInit ResolveMsg",0));
}
IMessage* imessage;
HRESULT hr = S_OK;
hResult = ::OpenIMsgOnIStg(pMsgSession,MAPIAllocateBuffer,MAPIAllocateMore,MAPIFreeBuffer,m_pMalloc,0,
pStorage,0, 0, 0, &imessage);
if (hResult !=S_OK){
throw(HResultException("OpenIMsgOnIStg ResolveMsg",0));
}
IConverterSession* pConverterSession;
hResult = CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER, IID_IConverterSession, (void **) &pConverterSession);
if (hResult !=S_OK){
throw(HResultException("Cancel ResolveMsg",0));
}
pConverterSession->SetEncoding(IET_QP);
pConverterSession->SetSaveFormat(SAVE_RFC822);
hResult = pConverterSession->MAPIToMIMEStm(LPMESSAGE(msgName.c_str()), LPSTREAM(imessage), CCSF_SMTP);
if (hResult !=S_OK){
throw(HResultException("MAPIToMIMEStm ResolveMsg",0));
}
}
::MAPIUninitialize();
|
|
|
|
|
Maybe you need to import a lib file.
|
|
|
|
|
monsieur_jj wrote: i am a super beginner at this.
So why in the world would you be starting off with a COM project? If you don't yet have the basics mastered, why make matters worse with COM, and MAPI atop that?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
how to change bitmap in on toolbar button??
There Is Nothing Right & Wrong
|
|
|
|
|
|
Hi
In my VC++ Socket programme I can connect to another system and transfer the data between them, the system are connected through LAN.
I want to know how can communicate with another system through Internet by socket programme(with out LAN ,through Internet).
(Like Server running in anywhere and client was Running anywhere they are connect through internet by Socket programme)
Regards
shakumar
shakumar
|
|
|
|
|
It should work exactly the same - your connect() call can specify 'www.codeproject.com' just as easily as it can specify '192.168.0.5' - if this does not seem to work, perhaps a small code sample showing how you try to connect to the remote server would help us see where the problem lies?
|
|
|
|
|
You shouldn't be facing any problem to connect to the Internet Server. But to Retrive or to send the Data on the Internet server you need to follow the Http protocol. that mean you first need to send the Http Header. That depends on the metod you are using. There are two Methods in Http, Http POST and Http GET.
Try to find out the header for that and Send it Before you send the data.
The Sample Header is as Follow. Try it if it works
"POST / HTTP/1.0\n
Accept: image/gif, image/x-xbitmap, */*\n
Accept-Language: en-us\n
Accept-Encoding: gzip, deflate\n
User-Agent: Mozilla/4.0\n
Host: WWW.CODEPROJECT.COM\n
Content-Type: application/x-www-form-urlencoded"
|
|
|
|
|
This time is measured in the number of seconds elapsed since 00:00:00 January 1, 1970, Universal Coordinated Time.
TimeGenerated = 1183355639
So how do I get it to the correct time??
Many thanks
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|