What editors do you use for use with DLLs and COM?

Discuss features, issues, about Editors for AHK
User avatar
CoffeeChaton
Posts: 44
Joined: 11 May 2024, 10:50

What editors do you use for use with DLLs and COM?

Post by CoffeeChaton » 21 May 2024, 06:01

My guess is that, in Visual Studio or other IDEs, people edit in C/CPP/C-sharp with reliable autocomplete and hover features, and then translate it into AHK.
Could you provide a brief GIF to demonstrate how people typically use DLL/COM?
If possible, please also explain how to configure the editor/IDE for this.

Or do people simply Google search, then go to Microsoft's website to step-by-step copy the usable methods and functions, and directly write .ahk files?

User avatar
boiler
Posts: 17412
Joined: 21 Dec 2014, 02:44

Re: What editors do you use for use with DLLs and COM?

Post by boiler » 22 May 2024, 04:03

I’m not sure what you’re asking. To connect to and interface with a COM object, there’s nothing to write in C or any other language. Just interface with the object per the Microsoft specs directly in AHK. Is that what you mean? Is below an example of what you were thinking might be written in C/C++/C# first before producing this AHK code?

Code: Select all

NumpadAdd:: {
	w := ComObjActive('Word.Application')
	if (SubStr(w.Selection.Range.Text, -1) = ' ')
		w.Selection.SetRange(w.Selection.Range.Start, w.Selection.Range.End - 1)
	w.Selection.Range.HighlightColorIndex := 7 ; yellow
	w.Selection.Collapse(0)
}

Similarly for DLLs, are you asking about creating a DLL, or just calling a function in an existing DLL? If the latter, what is there to write in one of the other languages before writing the AHK call?

User avatar
CoffeeChaton
Posts: 44
Joined: 11 May 2024, 10:50

Re: What editors do you use for use with DLLs and COM?

Post by CoffeeChaton » 22 May 2024, 06:02

What I mean is, in other languages ​​​​and corresponding IDEs, how to obtain completion/hover/ and other functions when using functions in DLL/COM.

I recently studied how to get a better DLL/COM editing experience in AHK v1/v2 or markdown, so I would like to refer to the operations of other IDEs.

Image

data is from https://github.com/microsoft/windows-rs/blob/master/crates/targets/baseline/gdiplus.dll.c

User avatar
thqby
Posts: 435
Joined: 16 Apr 2021, 11:18
Contact:

Re: What editors do you use for use with DLLs and COM?

Post by thqby » 22 May 2024, 07:53

For c/cpp, as long as #include corresponds to the header file, the editor can provide related completion and other functions.

For popular languages such as rust, the projection of the corresponding language can be generated through win32metadata.

User avatar
CoffeeChaton
Posts: 44
Joined: 11 May 2024, 10:50

Re: What editors do you use for use with DLLs and COM?

Post by CoffeeChaton » 22 May 2024, 11:41

i will try it tks

User avatar
thqby
Posts: 435
Joined: 16 Apr 2021, 11:18
Contact:

Re: What editors do you use for use with DLLs and COM?

Post by thqby » 22 May 2024, 16:33

https://github.com/ynkdir/winmd-printer/tree/main/win32

Here you can find metadata in json format.

User avatar
CoffeeChaton
Posts: 44
Joined: 11 May 2024, 10:50

Re: What editors do you use for use with DLLs and COM?

Post by CoffeeChaton » 22 May 2024, 18:24

This is exactly what I want!

Post Reply

Return to “Editors”