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
Win32 helper #894
Comments
Does this feature need to work in conjunction with SmartIndenter, so that compiler directives and declare statements are indented and line-continued upon insertion? |
Would also be great if this helper could create the required Types for function structs, and enums for function parameters. |
@ThunderFrame I wouldn't make it depend on the indenter; the code could easily be inserted "pre-formatted" - running the indenter would then make it conform to whatever options the user configured it for. |
And yeah, it should create the needed types on the fly if they don't already exist in the active project. |
Might be good to put the definitions into XML format. That would allow us to filter/find functions suitable for the platform, apply category tags, define dependencies. |
👍 I like that, very very much!
…Sent from my Toaster
|
might also be nice to build classes and callbacks for functions that require them. Eg. CopyFileEx and CopyFile2ProgressRoutine |
and finally (this might be a separate issue)... |
I had a look at how the PInvoke VS extension gets function declarations. The extenaion gets the full declaration (in both VB.Net and C#) in an XML SOAP request. Being a full declaration, it doesn't break the arguments, types and return types down into XML nodes. But the XML schema could be enhanced to handle that. |
👍 |
This probably isn't capturing enough detail, and the schema could probably be tweaked, but this is what I'm thinking...
|
Hi guys, I'm not sure if this is helpful since @ThunderFrame might have a way to implement PInvoke's VS extension method already, but I requested a copy of a sqlite database from Dennis Wallentin via Ron de Bruin's website who compiled the api declarations for vba some time ago. It's also not very granular but a fair amount of work has been done and it looks to be high quality after some perusal of tricky cases. I was going to use this personally. I don't know if this would be overkill for rd but my thought was to store the declarations in an external repository, scan my projects (or a helper class) for api calls just in time for compilation, and then write the found api references to a public module in my project using the proper conditional compilation constants for supporting 32bit, 64bit, vba7 etc. Either way, here is the database attached: |
Hey @coramuirgen! Thank you very much for the leg work! The team appreciates it. |
Dennis, who contributed the db, is really interested to hear about rd and wants to "spread the word"/write a review about it when v2 is out. He occasionally writes pieces for Daily Dose of Excel. I'll let him know, and his address is Dennis Wallentin consult@excelkb.com. |
out of scope. a plugin for this isn't out of question though |
Let's make a little tool that will bring up a browser dialog that lists some commonly used User32 and Kernel32 functions and procedures, and inserts the appropriate
Declare
statements for 32 and/or 64-bit. There should be a small description for each function, and a small preview box showing the code to be inserted.When 64-bit is selected, declare statement should use the
PtrSafe
keyword, and when both 32 and 64 bit are selected, code should include an#If
directive to conditionally compile the declaration.The helper should allow inserting multiple declarations at once, and place the multiple x64 declarations inside a single
#If
directive.The text was updated successfully, but these errors were encountered: