Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: third_party/lzma/v4_65/files/CPP/Windows/DLL.h

Issue 624713003: Keep only base/extractor.[cc|h]. (Closed) Base URL: https://chromium.googlesource.com/external/omaha.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Windows/DLL.h
2
3 #ifndef __WINDOWS_DLL_H
4 #define __WINDOWS_DLL_H
5
6 #include "../Common/MyString.h"
7
8 namespace NWindows {
9 namespace NDLL {
10
11 class CLibrary
12 {
13 bool LoadOperations(HMODULE newModule);
14 protected:
15 HMODULE _module;
16 public:
17 operator HMODULE() const { return _module; }
18 HMODULE* operator&() { return &_module; }
19
20 CLibrary():_module(NULL) {};
21 ~CLibrary();
22 void Attach(HMODULE m)
23 {
24 Free();
25 _module = m;
26 }
27 HMODULE Detach()
28 {
29 HMODULE m = _module;
30 _module = NULL;
31 return m;
32 }
33
34 // operator HMODULE() const { return _module; };
35 bool IsLoaded() const { return (_module != NULL); };
36 bool Free();
37 bool LoadEx(LPCTSTR fileName, DWORD flags = LOAD_LIBRARY_AS_DATAFILE);
38 bool Load(LPCTSTR fileName);
39 #ifndef _UNICODE
40 bool LoadEx(LPCWSTR fileName, DWORD flags = LOAD_LIBRARY_AS_DATAFILE);
41 bool Load(LPCWSTR fileName);
42 #endif
43 FARPROC GetProcAddress(LPCSTR procName) const
44 { return ::GetProcAddress(_module, procName); }
45 };
46
47 bool MyGetModuleFileName(HMODULE hModule, CSysString &result);
48 #ifndef _UNICODE
49 bool MyGetModuleFileName(HMODULE hModule, UString &result);
50 #endif
51
52 }}
53
54 #endif
OLDNEW
« no previous file with comments | « third_party/lzma/v4_65/files/CPP/Common/Wildcard.cpp ('k') | third_party/lzma/v4_65/files/CPP/Windows/DLL.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698