/* Uprise - Test Framework for Uprising
 * Copyright (C) 2001-2002  Jay Freeman (saurik)
*/

/*
 *        Redistribution and use in source and binary
 * forms, with or without modification, are permitted
 * provided that the following conditions are met:
 * 
 * 1. Redistributions of source code must retain the
 *    above copyright notice, this list of conditions
 *    and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the
 *    above copyright notice, this list of conditions
 *    and the following disclaimer in the documentation
 *    and/or other materials provided with the
 *    distribution.
 * 3. The name of the author may not be used to endorse
 *    or promote products derived from this software
 *    without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS''
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#define DIAPEXIS_COM_WRAPPER

#include "diapexis/Standard.h"

#include "diapexis/Framework.h"
#include "diapexis/Unknown.h"

#include "shlobj.h"
#include "comdef.h"

GUID NoneID = { /* bd101a9c-ef4d-4873-b036-d7abf06e9ca0 */
    0xbd101a9c, 0xef4d, 0x4873, {0xb0, 0x36, 0xd7, 0xab, 0xf0, 0x6e, 0x9c, 0xa0} };
GUID NormalID = { /* b045e58a-674a-4a65-b9d2-e4e2850b96da */
	0xb045e58a, 0x674a, 0x4a65, {0xb9, 0xd2, 0xe4, 0xe2, 0x85, 0x0b, 0x96, 0xda} };
GUID AddedID = { /* 25f6c6b1-529b-4f20-9ef7-b909c6cd89d6 */
    0x25f6c6b1, 0x529b, 0x4f20, {0x9e, 0xf7, 0xb9, 0x09, 0xc6, 0xcd, 0x89, 0xd6} };
GUID AbsentID = { /* a34caf9c-1d1f-44aa-8f4f-f30c8447663b */
    0xa34caf9c, 0x1d1f, 0x44aa, {0x8f, 0x4f, 0xf3, 0x0c, 0x84, 0x47, 0x66, 0x3b} };
GUID DeletedID = { /* 47dadea1-2017-43d4-8988-1ac405a64365 */
    0x47dadea1, 0x2017, 0x43d4, {0x89, 0x88, 0x1a, 0xc4, 0x05, 0xa6, 0x43, 0x65} };
GUID ReplacedID = { /* 7da3143e-58ed-484f-8dd2-e23d34eb7e68 */
    0x7da3143e, 0x58ed, 0x484f, {0x8d, 0xd2, 0xe2, 0x3d, 0x34, 0xeb, 0x7e, 0x68} };
GUID ModifiedID = { /* 36125516-5064-4972-abc7-80aedf75dc34 */
    0x36125516, 0x5064, 0x4972, {0xab, 0xc7, 0x80, 0xae, 0xdf, 0x75, 0xdc, 0x34} };
GUID MergedID =	{ /* dbd6db4f-e812-4c9c-a01f-4a642a4c052b */
    0xdbd6db4f, 0xe812, 0x4c9c, {0xa0, 0x1f, 0x4a, 0x64, 0x2a, 0x4c, 0x05, 0x2b} };
GUID ConflictedID = { /* c6aacea4-978c-43ee-8948-d37b1fed3321 */
    0xc6aacea4, 0x978c, 0x43ee, {0x89, 0x48, 0xd3, 0x7b, 0x1f, 0xed, 0x33, 0x21} };

int main() {
	Diapexis::PexInitialize();

	IShellIconOverlayIdentifier *overlay;
	Diapexis::PexCreateInstance(NormalID, __uuidof(IShellIconOverlayIdentifier), (void **) &overlay);

	bool is = overlay->IsMemberOf(L"D:\\Code\\Ninetjer", 0) == S_OK;

	overlay->Release();

	Diapexis::PexTerminate();
	return 0;
}