ShadowHawk071998
asked on
Win95 Network (Workgroups?) routines?
How do I use the Windows Network? I mean the Win95 workgroups network. I want to access other
computers. How do I do it?
How do I enter the password for shared folders? Will it be possible to write a program that 'hacks' this
password? It seems possible to me...
computers. How do I do it?
How do I enter the password for shared folders? Will it be possible to write a program that 'hacks' this
password? It seems possible to me...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Here's my code in C++Builder. The conversion to Delphi should be trivial, but I can do it for you if you like
LPSHELLFOLDER lpsf = NULL, lpsf2 = NULL;
LPITEMIDLIST pidl, lpi = NULL;
LPENUMIDLIST lpe;
SHGetDesktopFolder(&lpsf);
SHGetSpecialFolderLocation (Handle, CSIDL_NETWORK, &lpi);
lpsf->BindToObject((LPCITE MIDLIST)lp i, NULL, IID_IShellFolder, (LPVOID *)&lpsf2);
lpsf2->EnumObjects(Handle, 32 | 64 | 128, &lpe);
while (S_OK == lpe->Next(1, &lpi, &ulFetched))
{
char lpName[MAX_PATH];
memset(lpName, 0, 256);
STRRET StrName;
lpsf->GetDisplayNameOf(lpi , dwFlags, &StrName);
switch(StrName.uType)
{
case STRRET_WSTR:
WideCharToMultiByte(CP_ACP ,0,StrName .pOleStr,- 1,lpName,
sizeof(lpName),NULL,NULL);
break;
case STRRET_OFFSET:
strcpy(lpName, (LPSTR)lpi+StrName.uOffset );
break;
case STRRET_CSTR:
strcpy(lpName, (LPSTR)StrName.cStr);
break;
}
}
Enjoy!
LPSHELLFOLDER lpsf = NULL, lpsf2 = NULL;
LPITEMIDLIST pidl, lpi = NULL;
LPENUMIDLIST lpe;
SHGetDesktopFolder(&lpsf);
SHGetSpecialFolderLocation
lpsf->BindToObject((LPCITE
lpsf2->EnumObjects(Handle,
while (S_OK == lpe->Next(1, &lpi, &ulFetched))
{
char lpName[MAX_PATH];
memset(lpName, 0, 256);
STRRET StrName;
lpsf->GetDisplayNameOf(lpi
switch(StrName.uType)
{
case STRRET_WSTR:
WideCharToMultiByte(CP_ACP
sizeof(lpName),NULL,NULL);
break;
case STRRET_OFFSET:
strcpy(lpName, (LPSTR)lpi+StrName.uOffset
break;
case STRRET_CSTR:
strcpy(lpName, (LPSTR)StrName.cStr);
break;
}
}
Enjoy!
ASKER
That is much better :)
I would hugely appriciate having you 'translate' it to delphi if you have the time. Although I 'know' C++ I haven't used it in years. I should start soon, but I'd prefer a pascal example...
Thanks again!
I would hugely appriciate having you 'translate' it to delphi if you have the time. Although I 'know' C++ I haven't used it in years. I should start soon, but I'd prefer a pascal example...
Thanks again!
ASKER
Anyone has more 'concrete' suggestions? So I won't have to hack it down all
myself?
How do I ACTUALLY use these in Delphi? Anyone can give a short example?