Skip to content

Commit 68ed3e5

Browse files
committed
Merge pull request #194 from headcrashing/CLSIDFromProgID
Clsid from prog
2 parents 2549728 + b6b3a51 commit 68ed3e5

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

CHANGES.md

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Features
1818
* [#183](https://github.com/twall/jna/pull/183): Added `StructureFieldOrderInspector` unit test utility to scan for `Structure` field issues; see: `com.sun.jna.platform.StructureFieldOrderTest.testMethodGetFieldOrder` - [@bhamail](https://github.com/bhamail).
1919
* [#187](https://github.com/twall/jna/pull/187): Allow `StructureFieldOrderTest` unit test in platform project to run on Linux - [@bhamail](https://github.com/bhamail).
2020
* [#192](https://github.com/twall/jna/pull/192): Added Win32 `SHGetSpecialFolderPath()` and initialization file (.ini) API functions from `kernel32.dll` - [@headcrashing](https://github.com/headcrashing).
21+
* [#194](https://github.com/twall/jna/pull/194): Added Unit Test for `CLSIDFromProgID()` - [@headcrashing](https://github.com/headcrashing).
2122

2223
Release 3.5.1
2324
====================

contrib/platform/test/com/sun/jna/platform/win32/Ole32Test.java

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
1+
/* Copyright (c) 2010, 2013 Daniel Doubrovkine, Markus Karg, All Rights Reserved
22
*
33
* This library is free software; you can redistribute it and/or
44
* modify it under the terms of the GNU Lesser General Public
@@ -18,11 +18,11 @@
1818
import com.sun.jna.Pointer;
1919
import com.sun.jna.platform.win32.Guid.GUID;
2020
import com.sun.jna.platform.win32.WinNT.HRESULT;
21-
import com.sun.jna.platform.win32.COM.IUnknown;
2221
import com.sun.jna.ptr.PointerByReference;
2322

2423
/**
2524
* @author dblock[at]dblock[dot]org
25+
* @author markus[at]headcrashing[dot]eu
2626
*/
2727
public class Ole32Test extends TestCase {
2828

@@ -101,4 +101,10 @@ public void testCoCreateInstance() {
101101
if (W32Errors.SUCCEEDED(hrCI.intValue()))
102102
Ole32.INSTANCE.CoUninitialize();
103103
}
104+
105+
public final void testCLSIDFromProgID() {
106+
final Guid.CLSID.ByReference clsid = new Guid.CLSID.ByReference();
107+
assertEquals(WinError.S_OK, Ole32.INSTANCE.CLSIDFromProgID("jpegfile", clsid));
108+
assertEquals("{25336920-03F9-11CF-8FD0-00AA00686F13}", clsid.toGuidString());
109+
}
104110
}

0 commit comments

Comments
 (0)