| Anonymous | Login | Signup for a new account | 2013-05-19 04:16 CEST | ![]() |
| All Projects | FPC | Lazarus: Packages, Patches | Lazarus CCR | Mantis | fpGUI | fpcprojects: fpprofiler |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0022442 | FPC | FCL | public | 2012-07-15 21:27 | 2013-05-05 22:22 | ||||
| Reporter | ocean | ||||||||
| Assigned To | Marco van de Voort | ||||||||
| Priority | normal | Severity | minor | Reproducibility | always | ||||
| Status | closed | Resolution | fixed | ||||||
| Platform | OS | OS Version | |||||||
| Product Version | Product Build | ||||||||
| Target Version | Fixed in Version | 2.7.1 | |||||||
| Summary | 0022442: Add IOleControl to Activex | ||||||||
| Description | Works in Delphi: uses ActiveX; var Control: IOleControl; It's only few lines, needed for var Control: IOleControl; begin if Browser.comserver.QueryInterface(IOleControl, Control)=0 then Control.OnAmbientPropertyChange(DISPID_AMBIENT_DLCONTROL); end; | ||||||||
| Tags | activex, Delphi | ||||||||
| FPCOldBugId | |||||||||
| Fixed in Revision | 24435 | ||||||||
| Attached Files | |||||||||
Relationships |
|||||||||||
|
|||||||||||
Notes |
|
|
(0061096) ocean (reporter) 2012-07-17 09:20 |
It's in OCIdl.idl and adding these lines allow call to OnAmbientPropertyChange and set in Invoke. type PtagCONTROLINFO = ^tagCONTROLINFO; P_RemotableHandle = ^_RemotableHandle; wireHACCEL = P_RemotableHandle; tagCONTROLINFO = packed record cb : LongWord; hAccel : wireHACCEL; cAccel : Word; dwFlags : LongWord; end; type // IOleControl : IOleControl = interface(IUnknown) ['{B196B288-BAB4-101A-B69C-00AA00341D07}'] // GetControlInfo : procedure GetControlInfo(var pCI:tagCONTROLINFO);stdcall; // OnMnemonic : procedure OnMnemonic(var pMsg:tagMSG);stdcall; // OnAmbientPropertyChange : procedure OnAmbientPropertyChange(dispID:Integer);stdcall; // FreezeEvents : procedure FreezeEvents(bFreeze:Integer);stdcall; end; |
|
(0061098) Marco van de Voort (manager) 2012-07-17 10:01 |
I will look at it during the weekend. The main concern is the "packed". Be careful with that (it must following the packing of the header exactly) or there is a chance it won't work on 64-bit. The same with types and/or enums that might have different sizes in 64-bit. |
|
(0061127) ocean (reporter) 2012-07-18 18:33 |
Ok, thanks! There is another one I'm using in same idl / activex, maybe look that too?! (Browser.comserver.Document as IPersistStreamInit).Load(TStreamAdapter.Create(ms)); // IPersistStreamInit : IPersistStreamInit = interface(IPersist) ['{7FD52380-4E07-101B-AE2D-08002B2EC713}'] // IsDirty : procedure IsDirty;safecall; // Load : procedure Load(pstm:IStream);safecall; // Save : procedure Save(pstm:IStream;fClearDirty:Integer);safecall; // GetSizeMax : procedure GetSizeMax(out pCbSize:_ULARGE_INTEGER);safecall; // InitNew : procedure InitNew;safecall; end; BTW, why does "Import type library" create only procedures, bug? These are really functions. |
|
(0061149) Ludo Brands (developer) 2012-07-20 09:48 |
See 22109 for import type library and procedures question. |
|
(0063418) ocean (reporter) 2012-10-24 17:52 |
Attached new oc_0_0_tlb.pas (I used fixed typelib importer) |
|
(0063420) Marco van de Voort (manager) 2012-10-24 20:29 |
It doesn't compile :-) urlmon.pas(375,29) Error: Data types which require initialization/finalization can't be used in variant records which is the TAGBINDPTR definition |
|
(0063422) ocean (reporter) 2012-10-24 21:52 |
Well, I didn't try to compile all of it. Just copied parts needed (those in notes 1 and 3) |
|
(0066616) ocean (reporter) 2013-03-29 09:04 |
Attached patch for IPersistStreamInit. I changed safecalls to HResult;StdCall; based on: http://msdn.microsoft.com/en-us/library/windows/desktop/ms682273(v=vs.85).aspx [^] Is there something wrong with this, works here. |
|
(0067432) Marco van de Voort (manager) 2013-05-04 22:22 |
Committed |
|
(0067481) ocean (reporter) 2013-05-05 22:22 |
Thanks! |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2012-07-15 21:27 | ocean | New Issue | |
| 2012-07-17 09:18 | ocean | File Added: oc_0_0_tlb.pas | |
| 2012-07-17 09:20 | ocean | Note Added: 0061096 | |
| 2012-07-17 10:01 | Marco van de Voort | Note Added: 0061098 | |
| 2012-07-18 18:33 | ocean | Note Added: 0061127 | |
| 2012-07-20 09:48 | Ludo Brands | Note Added: 0061149 | |
| 2012-07-20 14:06 | Anton Klijnsma | Tag Attached: activex | |
| 2012-07-20 14:06 | Anton Klijnsma | Tag Attached: Delphi | |
| 2012-10-06 13:09 | Marco van de Voort | Relationship added | related to 0022109 |
| 2012-10-24 17:51 | ocean | File Added: new_oc_0_0_tlb.pas | |
| 2012-10-24 17:52 | ocean | Note Added: 0063418 | |
| 2012-10-24 20:29 | Marco van de Voort | Note Added: 0063420 | |
| 2012-10-24 21:52 | ocean | Note Added: 0063422 | |
| 2013-03-29 09:03 | ocean | File Added: IPersistStreamInit.patch | |
| 2013-03-29 09:04 | ocean | Note Added: 0066616 | |
| 2013-04-17 19:25 | Marco van de Voort | Relationship added | related to 0024218 |
| 2013-05-04 22:22 | Marco van de Voort | Fixed in Revision | => 24435 |
| 2013-05-04 22:22 | Marco van de Voort | Note Added: 0067432 | |
| 2013-05-04 22:22 | Marco van de Voort | Status | new => resolved |
| 2013-05-04 22:22 | Marco van de Voort | Fixed in Version | => 2.7.1 |
| 2013-05-04 22:22 | Marco van de Voort | Resolution | open => fixed |
| 2013-05-04 22:22 | Marco van de Voort | Assigned To | => Marco van de Voort |
| 2013-05-05 22:22 | ocean | Note Added: 0067481 | |
| 2013-05-05 22:22 | ocean | Status | resolved => closed |
| Main | My View | View Issues | Change Log | Roadmap |



