[progress Communities] [progress Openedge Abl] Forum Post: Re: I Need To Pass A Com-handle...

Status
Not open for further replies.
P

pmarshall

Guest
We have code that generates User Properties on an Outlook MailItem in ABL, from existing code. We also do the same thing in our C# VSTO addin. However I need to mark the UserProperty as none printable, which I can do using reflection in a C# dll, and is working in the VSTO addin, and I want to share the same code (as I can't see a way to do the same thing in ABL via the com handle). the C# code for the disabling print: public void DisablePrint(object customProperty) { long printablePropertyFlag = 0x4; // PDO_PRINT_SAVEAS string printablePropertyCode = "[DispID=107]"; Type customPropertyType = customProperty.GetType(); // Get current flags. object rawFlags = customPropertyType.InvokeMember(printablePropertyCode, BindingFlags.GetProperty, null, customProperty, null); long flags = long.Parse(rawFlags.ToString()); // Remove printable flag. flags &= ~printablePropertyFlag; object[] newParameters = new object[] { flags }; // Set current flags. customPropertyType.InvokeMember(printablePropertyCode, BindingFlags.SetProperty, null, customProperty, newParameters); } If there's a way to replicate this purely in ABL i'll give it a go, but I can't 'GetType()' on a com-handle either. I appreciate this is a real edge case. Peter

Continue reading...
 
Status
Not open for further replies.
Top