mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-09 04:07:08 -06:00
55 lines
1.2 KiB
C++
Executable File
55 lines
1.2 KiB
C++
Executable File
// Windows/Net.h
|
|
|
|
#pragma once
|
|
|
|
#ifndef __WINDOWS_NET_H
|
|
#define __WINDOWS_NET_H
|
|
|
|
#include "Common/Buffer.h"
|
|
#include "Common/String.h"
|
|
|
|
namespace NWindows {
|
|
namespace NNet {
|
|
|
|
struct CResource
|
|
{
|
|
DWORD Scope;
|
|
DWORD Type;
|
|
DWORD DisplayType;
|
|
DWORD Usage;
|
|
bool LocalNameIsDefined;
|
|
bool RemoteNameIsDefined;
|
|
bool CommentIsDefined;
|
|
bool ProviderIsDefined;
|
|
CSysString LocalName;
|
|
CSysString RemoteName;
|
|
CSysString Comment;
|
|
CSysString Provider;
|
|
};
|
|
|
|
class CEnum
|
|
{
|
|
HANDLE _handle;
|
|
bool _handleAllocated;
|
|
protected:
|
|
bool IsHandleAllocated() const { return _handleAllocated; }
|
|
public:
|
|
CEnum(): _handleAllocated(false) {}
|
|
~CEnum() { Close(); }
|
|
DWORD Open(DWORD scope, DWORD type, DWORD usage, LPNETRESOURCE netResource);
|
|
DWORD Open(DWORD scope, DWORD type, DWORD usage, const CResource *resource);
|
|
DWORD Close();
|
|
DWORD Next(LPDWORD lpcCount, LPVOID lpBuffer, LPDWORD lpBufferSize);
|
|
DWORD Next(CResource &resource);
|
|
};
|
|
|
|
DWORD GetResourceParent(const CResource &resource, CResource &parentResource);
|
|
DWORD GetResourceInformation(const CResource &resource,
|
|
CResource &destResource, CSysString &systemPathPart);
|
|
DWORD AddConnection2(const CResource &resource,
|
|
LPCTSTR password, LPCTSTR userName, DWORD flags);
|
|
|
|
}}
|
|
|
|
#endif
|