Solved

Win95 Network (Workgroups?) routines?

Posted on 1998-07-19
4
273 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses
Course of the Month6 days, 1 hour left to enroll

627 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