|
/**
* This code is by OShah. all code will have the following licence.
* Copyright Shexec32. All code bears the following licence:
**/
/**
* Copyright Shexec32 2004-2005. All rights reserved.
*
* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
* ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED
* TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
* PARTICULAR PURPOSE.
**/
#ifndef APIS_H
#define APIS_H
#ifdef FILEPERMSBOXDLL
#define FILEPERMSBOXDLL_IMPORT
#else /* FILEPERMSBOXDLL. make functions export when compiling as a DLL */
#define FILEPERMSBOXDLL_IMPORT __declspec(dllimport)
#endif /* Set the functions to import into the current project */
#define STD(Xyx) static_cast<const std::basic_string<TCHAR> &>(Xyx)
/* shorthand converter for that long line. */
#ifdef _WIN64
FILEPERMSBOXDLL_IMPORT
ULONG_PTR LONG_PTR2(void *converterNumber);
#else /* _WIN64 */
FILEPERMSBOXDLL_IMPORT
ULONG LONG_PTR2(void *converterNumber);
#endif /* My version of HandleToULong[Ptr] */
FILEPERMSBOXDLL_IMPORT
extern HINSTANCE g_hInst; /* See SecurityCore.cpp */
/* These are the APIs. */
FILEPERMSBOXDLL_IMPORT
const _bstr_t __stdcall GetLastErrorText(DWORD dwError);
FILEPERMSBOXDLL_IMPORT
BOOL __stdcall DoSecurityBox(HWND TheirhWnd, SE_OBJECT_TYPE seObjType,
const std::list<const std::basic_string<TCHAR> > &FileNamesIn, BOOL AddWritability = FALSE);
FILEPERMSBOXDLL_IMPORT
BOOL __stdcall GetSDForObject(const std::basic_string<TCHAR> &FileName, \
std::basic_string<TCHAR> &SDDLString, const BOOL IncludeInherited);
FILEPERMSBOXDLL_IMPORT
BOOL __stdcall ShowAbout(HWND TheirhWnd);
FILEPERMSBOXDLL_IMPORT
BOOL __stdcall CheckVersion(void);
class CoAutoInitializer
{
/* automatic COM initialization/uninitialization. */
public:
CoAutoInitializer()
{
::CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
};
void compact(void)
{
::CoFreeUnusedLibraries();
};
~CoAutoInitializer()
{
::CoUninitialize();
};
private:
};
#endif /* APIS_H */
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
Mr. Shah is a reclusive C++/C# developer lurking somewhere in the depths of the city of London. He learnt physics at Kings' College London and obtained a Master in Science there. Having earned an MCAD, he teeters on the brink of transitioning from C++ to C#, unsure of which language to jump to. Fortunately, he also knows how to use .NET interop to merge code between the two languages (which means he won't have to make the choice anytime soon).
His interests (apart from programming) are walking, football (the real one!), philosophy, history, retro-gaming, strategy gaming, and any good game in general.
He maintains a website / blog / FAQ / junk at shexec32.serveftp.net, where he places the best answers he's written to the questions you've asked. If you can find him, maybe you can hire Mr. Shah to help you with anything C++[/CLI]/C#/.NET related
.