Solved

Win95 Network (Workgroups?) routines?

Posted on 1998-07-19
4
272 Views
Last Modified: 2010-04-04
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...
0
Comment
Question by:ShadowHawk071998
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 

Accepted Solution

by:
lorenk earned 90 total points
ID: 1358243
Do you mean "how do you programmatically access other machines on the Windows Network?"  If so, then the answer is with the Shell API found in Shell32.dll.

The functions you want are:

SHGetDesktopFolder to get an instance of the desktop
then:

SHGetSpecialFolderLocation to get the instance of the network neighborhood.

-Loren
0
 

Author Comment

by:ShadowHawk071998
ID: 1358244
Okay.
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?
0
 

Expert Comment

by:lorenk
ID: 1358245
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((LPCITEMIDLIST)lpi, 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!
0
 

Author Comment

by:ShadowHawk071998
ID: 1358246
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!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question