flat assembler
Message board for the users of flat assembler.
Index
> Windows > Automatic generation of COM interface definition |
Author |
|
Coty 13 Mar 2012, 19:44
Are you asking how to invoke windows's COM API from Assembly? Or am I mistaken? If so, there are a few examples included in FASM's ZIP file that demonstrate invoking things from windows API...
|
|||
13 Mar 2012, 19:44 |
|
Smokin Marlboro 13 Mar 2012, 20:28
I know how to invoke COM API, I need only the declarations of interfaces, but a lot of them - and writing them one by one is, well, very time-consuming, boring, susceptible to errors and hard to accomplish without knowing the order of methods in an interface. AFAIK, C++ headers from Windows SDK contain all the info I need, but I don't know how to parse it and be sure it's valid. There are, though, IDL files, which are simpler to understand, but not every DLL that exports COM API has corresponding IDL file. D2D1, for example, has no IDL and d2d1.h is amazingly unclear.
|
|||
13 Mar 2012, 20:28 |
|
revolution 14 Mar 2012, 06:11
Smokin Marlboro: What do you want us to do? It is not clear what you are asking for. Do you want us to do the work of extraction for you? Do you want us to tell you how to extract or where to extract from? Do you want us to write a program of some type? Do you need help from us to write your own program? Do you want us to google something for you? Something else?
|
|||
14 Mar 2012, 06:11 |
|
Smokin Marlboro 14 Mar 2012, 08:06
Sorry if my question is not clear. I'll give you an example.
Suppose I want to use Direct2D in my program. I know what methods to call, I know parameters these methods accept. I just don't know the order of methods in a specific interface. From my experience with COM interop in C# I assume the order to be important. So this specific problem is - where to get info that helps me to build all interface definitions for FASM that I need? Anyway, I'm currently extracting info from d2d1.h manually, but if there is a way to generate the info I need - it would be great. |
|||
14 Mar 2012, 08:06 |
|
Blank 17 Mar 2012, 15:53
Smokin Marlboro, extraction would be executed in short time, if you use some editor with find/replace function which support regexp(e.g. Notepad++). For example I'm easily port interface structs(of Direct3D) from c headers to fasm's interface delarations.
Code: //from... DECLARE_INTERFACE_(IDirect3D9,IUnknown) { STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE; STDMETHOD_(ULONG,AddRef)(THIS) PURE; STDMETHOD_(ULONG,Release)(THIS) PURE; //... ; to... interface IDirect3D9,\ QueryInterface,\ AddRef,\ Release,\ ;... |
|||
17 Mar 2012, 15:53 |
|
typedef 29 Mar 2012, 04:38
I have visual studio if you need help with them I can give them to you in FASM include format.
|
|||
29 Mar 2012, 04:38 |
|
bzdashek 29 Mar 2012, 06:53
typedef wrote: I have visual studio if you need help with them I can give them to you in FASM include format. Do you use some tool or convert them manually? |
|||
29 Mar 2012, 06:53 |
|
typedef 29 Mar 2012, 17:59
No Usually the ones I have used have like 10-30 functions so it's just copy & paste. But I can make a tool in PHP to do that or in C/C++.
Do you want me to ? PHP is better this way though |
|||
29 Mar 2012, 17:59 |
|
bzdashek 30 Mar 2012, 05:09
typedef wrote: No Usually the ones I have used have like 10-30 functions so it's just copy & paste. But I can make a tool in PHP to do that or in C/C++. Well, I do not use COM much myself yet, but I think this tool will be very helpful for those who do, so I believe it would be great, if you find some time to make it. But it's your time, of course, so the final decision is yours. |
|||
30 Mar 2012, 05:09 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.