Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#615: added TYPEFLAGS constants for TYPEATTR in ITypeInfo.GetTypeAttr() #621

Merged
merged 1 commit into from
Mar 27, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,16 @@ Features
* [#577](https://github.com/java-native-access/jna/pull/577): Apply generic definitions wherever applicable - [@lgoldstein](https://github.com/lgoldstein).
* [#569](https://github.com/java-native-access/jna/pull/569): Added `com.sun.jna.platform.win32.Winspool.PRINTER_INFO_2` support. Added GetPrinter and ClosePrinter functions in `com.sun.jna.platform.win32.Winspool` - [@IvanRF](https://github.com/IvanRF).
* [#583](https://github.com/java-native-access/jna/pull/583): Added printer attributes and status - [@IvanRF](https://github.com/IvanRF).
* [#589](https://github.com/java-native-access/jna/pull/589): Use MethodResultContext in direct mapping (as done in interface mapping) - [@marco2357](https://github.com/marco2357).
* [#589](https://github.com/java-native-access/jna/pull/589): Use `com.sun.jna.MethodResultContext` in direct mapping (as done in interface mapping) - [@marco2357](https://github.com/marco2357).
* [#595](https://github.com/java-native-access/jna/pull/595): Allow calling COM methods/getters requiring hybrid calling (METHOD+PROPERTYGET) - [@matthiasblaesing](https://github.com/matthiasblaesing).
* [#582](https://github.com/java-native-access/jna/pull/582): Mavenize the build process - Phase 1: building the native code via Maven [@lgoldstein](https://github.com/lgoldstein).
* [#606](https://github.com/java-native-access/jna/pull/606): Added Kerne32Util method to facilitate checking that calls to LocalFree/GlobalFree are successful [@lgoldstein](https://github.com/lgoldstein).
* [#612](https://github.com/java-native-access/jna/pull/612): 'Kernel32Util#freeLocal/GlobalMemory' always throws Win32Exception if failed [@lgoldstein](https://github.com/lgoldstein).
* [#608](https://github.com/java-native-access/jna/pull/608): Mavenize the build process - change parent and native pom artifactId/name to differentiate in IDE and build tools. [@bhamail](https://github.com/bhamail)
* [#613](https://github.com/java-native-access/jna/pull/613): Make Win32Exception extend LastErrorException [@lgoldstein](https://github.com/lgoldstein).
* [#613](https://github.com/java-native-access/jna/pull/614): Added standard 'Kernel32Util#closeHandle' method that throws a Win32Exception if failed to close the handle [@lgoldstein](https://github.com/lgoldstein).
* [#582](https://github.com/java-native-access/jna/pull/582): Mavenize the build process - Phase 1: building the native code via Maven - [@lgoldstein](https://github.com/lgoldstein).
* [#606](https://github.com/java-native-access/jna/pull/606): Added Kernel32Util method to facilitate checking that calls to LocalFree/GlobalFree are successful - [@lgoldstein](https://github.com/lgoldstein).
* [#612](https://github.com/java-native-access/jna/pull/612): `Kernel32Util.freeLocalMemory()`/`Kernel32Util.freeGlobalMemory()` always throw `com.sun.jna.platform.win32.Win32Exception` if failed - [@lgoldstein](https://github.com/lgoldstein).
* [#608](https://github.com/java-native-access/jna/pull/608): Mavenize the build process - change parent and native pom artifactId/name to differentiate in IDE and build tools. - [@bhamail](https://github.com/bhamail)
* [#613](https://github.com/java-native-access/jna/pull/613): Make `com.sun.jna.platform.win32.Win32Exception` extend `com.sun.jna.LastErrorException` - [@lgoldstein](https://github.com/lgoldstein).
* [#614](https://github.com/java-native-access/jna/pull/614): Added standard `com.sun.jna.platform.win32.Kernel32Util.closeHandle()` method that throws a `com.sun.jna.platform.win32.Win32Exception` if failed to close the handle - [@lgoldstein](https://github.com/lgoldstein).
* [#616](https://github.com/java-native-access/jna/pull/616): Allow access to base interfaces (most important IDispatch) via ProxyObject and improve binding by allowing to use dispId for the call - [@matthiasblaesing](https://github.com/matthiasblaesing).
* [#621](https://github.com/java-native-access/jna/pull/621): Added TYPEFLAGS-constants for `wTypeFlags` in `com.sun.jna.platform.win32.OaIdl.TYPEATTR` - [@SevenOf9Sleeper](https://github.com/SevenOf9Sleeper).

Bug Fixes
---------
Expand Down
83 changes: 83 additions & 0 deletions contrib/platform/src/com/sun/jna/platform/win32/OaIdl.java
Original file line number Diff line number Diff line change
Expand Up @@ -1458,6 +1458,7 @@ public static class ByReference extends TYPEATTR implements
public WORD cImplTypes;
public WORD cbSizeVft;
public WORD cbAlignment;
// The type flags. See TYPEFLAGS_...
public WORD wTypeFlags;
public WORD wMajorVerNum;
public WORD wMinorVerNum;
Expand All @@ -1479,5 +1480,87 @@ public TYPEATTR(Pointer pointer) {
protected List<String> getFieldOrder() {
return FIELDS;
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a different tab/spaces thing going on here. Can you please fix?

/**
* A type description that describes an Application object.
*/
public final static int TYPEFLAGS_FAPPOBJECT = 0x1;

/**
* Instances of the type can be created by ITypeInfo::CreateInstance.
*/
public final static int TYPEFLAGS_FCANCREATE = 0x2;

/**
* The type is licensed.
*/
public final static int TYPEFLAGS_FLICENSED = 0x4;

/**
* The type is predefined. The client application should automatically create a single instance of the object
* that has this attribute. The name of the variable that points to the object is the same as the class name of
* the object.
*/
public final static int TYPEFLAGS_FPREDECLID = 0x8;

/**
* The type should not be displayed to browsers.
*/
public final static int TYPEFLAGS_FHIDDEN = 0x10;

/**
* The type is a control from which other types will be derived, and should not be displayed to users.
*/
public final static int TYPEFLAGS_FCONTROL = 0x20;

/**
* The interface supplies both IDispatch and VTBL binding.
*/
public final static int TYPEFLAGS_FDUAL = 0x40;

/**
* The interface cannot add members at run time.
*/
public final static int TYPEFLAGS_FNONEXTENSIBLE = 0x80;

/**
* The types used in the interface are fully compatible with Automation, including VTBL binding support. Setting
* dual on an interface sets this flag in addition to TYPEFLAG_FDUAL. Not allowed on dispinterfaces.
*/
public final static int TYPEFLAGS_FOLEAUTOMATION = 0x100;

/**
* Should not be accessible from macro languages. This flag is intended for system-level types or types that
* type browsers should not display.
*/
public final static int TYPEFLAGS_FRESTRICTED = 0x200;

/**
* The class supports aggregation.
*/
public final static int TYPEFLAGS_FAGGREGATABLE = 0x400;

/**
* The type is replaceable.
*/
public final static int TYPEFLAGS_FREPLACEABLE = 0x800;

/**
* Indicates that the interface derives from IDispatch, either directly or indirectly. This flag is computed.
* There is no Object Description Language for the flag.
*/
public final static int TYPEFLAGS_FDISPATCHABLE = 0x1000;

/**
* The type has reverse binding.
*/
public final static int TYPEFLAGS_FREVERSEBIND = 0x2000;

/**
* Interfaces can be marked with this flag to indicate that they will be using a proxy/stub dynamic link
* library. This flag specifies that the typelib proxy should not be unregistered when the typelib is
* unregistered.
*/
public final static int TYPEFLAGS_FPROXY = 0x4000;
}
}