Solved

Win95 Network (Workgroups?) routines?

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi XE10 Round Image 2 129
Strange behavior when a form is closed 6 58
Need Help Delphi 2010 CheckBox1 Stored value in memo 13 67
Delphi: sending SMS on android platform 1 21
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

832 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