Click here to Skip to main content
15,917,709 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: I tried this, but Pin
Ravi Bhavnani21-Aug-02 5:51
professionalRavi Bhavnani21-Aug-02 5:51 
GeneralRe: I tried this, but Pin
Blade[DMS]21-Aug-02 5:49
Blade[DMS]21-Aug-02 5:49 
Generalthanks everyone. I used recordcount instead Pin
ns21-Aug-02 6:11
ns21-Aug-02 6:11 
GeneralRe: thanks everyone. I used recordcount instead Pin
Rashid Thadha21-Aug-02 6:21
Rashid Thadha21-Aug-02 6:21 
GeneralRe: I tried this, but Pin
Ranjan Banerji21-Aug-02 6:43
Ranjan Banerji21-Aug-02 6:43 
GeneralRe: quick question about recordsets, ADO Pin
Mazdak21-Aug-02 7:45
Mazdak21-Aug-02 7:45 
GeneralRe: quick question about recordsets, ADO Pin
Jon Hulatt22-Aug-02 4:18
Jon Hulatt22-Aug-02 4:18 
GeneralCreate shortcut to a folder failed Pin
Tida21-Aug-02 4:21
Tida21-Aug-02 4:21 
Hi all,

I need to create a short cut to a folder in my VC++ project.
But failed when use the following code
when create a short cut to a file this code work ok.
then how to create a short cut to a folder?
I couldn't find more documents.

Thanks for help.

//////////////////////////////////////
{
HRESULT hResult;
IShellLink * pShellLink;
IPersistFile * pPersistFile;
wchar_t SaveLinkName[MAX_PATH];

::CoInitialize(NULL);
hResult=::CoCreateInstance(CLSID_ShellLink,NULL,CLSCTX_INPROC_SERVER,
IID_IShellLink, (LPVOID FAR*)&pShellLink);
if (SUCCEEDED(hResult))
{
pShellLink->SetDescription(lpDescription);

pShellLink->SetPath(LinkedFileName);
hResult = pShellLink->QueryInterface(IID_IPersistFile,(LPVOID*)&pPersistFile);
if(SUCCEEDED(hResult))
{
MultiByteToWideChar(CP_ACP,0,LinkFileName,-1,SaveLinkName,MAX_PATH);
hResult=pPersistFile->Save(SaveLinkName, TRUE);
pPersistFile->Release();
}
pShellLink->Release();
}
::CoUninitialize();
return hResult;
}


GeneralMultiLine EditBox Question Pin
Cerb21-Aug-02 3:21
sussCerb21-Aug-02 3:21 
GeneralRe: MultiLine EditBox Question Pin
Chris Losinger21-Aug-02 3:27
professionalChris Losinger21-Aug-02 3:27 
GeneralRe: MultiLine EditBox Question Pin
Tomasz Sowinski21-Aug-02 3:27
Tomasz Sowinski21-Aug-02 3:27 
GeneralRe: MultiLine EditBox Question Pin
Cerb21-Aug-02 3:29
sussCerb21-Aug-02 3:29 
GeneralRe: MultiLine EditBox Question Pin
Cerb21-Aug-02 3:31
sussCerb21-Aug-02 3:31 
GeneralPassing a pointer to a char-array Pin
fheyn21-Aug-02 3:15
fheyn21-Aug-02 3:15 
GeneralRe: Passing a pointer to a char-array Pin
Ravi Bhavnani21-Aug-02 3:40
professionalRavi Bhavnani21-Aug-02 3:40 
GeneralRe: Passing a pointer to a char-array Pin
fheyn21-Aug-02 4:14
fheyn21-Aug-02 4:14 
GeneralRe: Passing a pointer to a char-array Pin
Chris Losinger21-Aug-02 4:20
professionalChris Losinger21-Aug-02 4:20 
GeneralRe: Passing a pointer to a char-array Pin
fheyn21-Aug-02 4:31
fheyn21-Aug-02 4:31 
GeneralRe: Passing a pointer to a char-array Pin
Tomasz Sowinski21-Aug-02 4:24
Tomasz Sowinski21-Aug-02 4:24 
GeneralRe: Passing a pointer to a char-array Pin
fheyn21-Aug-02 4:50
fheyn21-Aug-02 4:50 
GeneralRe: Passing a pointer to a char-array Pin
Ravi Bhavnani21-Aug-02 5:05
professionalRavi Bhavnani21-Aug-02 5:05 
Generalressource.dll error Pin
Mike Mc21-Aug-02 3:15
Mike Mc21-Aug-02 3:15 
GeneralRe: ressource.dll error Pin
Mike Mc21-Aug-02 8:22
Mike Mc21-Aug-02 8:22 
GeneralF1 invoke WinHelp, which I don't want it to Pin
lucy21-Aug-02 3:07
lucy21-Aug-02 3:07 
GeneralRe: F1 invoke WinHelp, which I don't want it to Pin
-Dy21-Aug-02 3:13
-Dy21-Aug-02 3:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.