trancexx Posted January 30, 2010 Share Posted January 30, 2010 (edited) Being part of the great AutoItObject.au3 project I was able to witness some brilliant moves done on the field of understanding the essence of the object programming on windows. That helped me a lot in my efforts, of course, of understanding the same thing.When AutoItObject would be published you will see how great it is. Until then here's some side effects...DirectX.So is it possible in AutoIt? I know there was some efforts but I just can't find the examples anywhere. Nevertheless. When you see some object as a group of pointers to some pointers wrapped in a pointer to pointer and then some more pointers, you realize that you can point your self to a place that points to a pointer of a solution pointer. Problem with AutoIt is that you can't define custom interface that you would be able to access. You either use IDispatch interface or you don't work with objects at all.Direct3D I'm showing here uses IDirect3D9 interface. Also it uses IDirect3DDevice9 (see that monster) interface, etc...monoceres said: "I will get that freaking pointer!" (my interpretation of his words). I tried the same here.Script (more like a proof of concept):DirectX.au3x86 only. Edited January 30, 2010 by trancexx ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
ProgAndy Posted January 30, 2010 Share Posted January 30, 2010 (edited) Yay! Here is the example you were looking for: http://www.autoitscript.com/forum/index.php?showtopic=84532&view=findpost&p=606233 Maybe objbase.au3 wll be of some help, too objbase.au3 Edited January 30, 2010 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
trancexx Posted January 30, 2010 Author Share Posted January 30, 2010 Yay! Here is the example you were looking for: #606233Maybe objbase.au3 wll be of some help, too ...and when I think of this and that Next time when I would have an idea I'll ask you if you already wrote it somewhere. Jump up ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
James Posted January 30, 2010 Share Posted January 30, 2010 (edited) Oooh purty triangle.Nice use of the new Static keyword too!Next time when I would have an idea I'll ask you if you already wrote it somewhere. Jump upOooh, Andy, you've just been whipped! Edited January 30, 2010 by JamesBrooks Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
UEZ Posted January 30, 2010 Share Posted January 30, 2010 After OpenGL now Direct3D! Your are awesome! Also to ProgAndy for his Direct3D code!Nice to have such talented coders around!UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
playlet Posted January 30, 2010 Share Posted January 30, 2010 (edited) --- Edited August 18, 2016 by playlet Link to comment Share on other sites More sharing options...
monoceres Posted January 31, 2010 Share Posted January 31, 2010 Nice! I remember working with this interface was a nightmare, then again, I did not understand it at the time. Maybe a fusion between IUnknown powered interfaces and AutoitObject would be cool? Definitely something to think about. Keeping sane when you have pointers all around you is hard (then again, are we really sane in the first place?). Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
trancexx Posted January 31, 2010 Author Share Posted January 31, 2010 (edited) Nice! I remember working with this interface was a nightmare, then again, I did not understand it at the time. Maybe a fusion between IUnknown powered interfaces and AutoitObject would be cool? Definitely something to think about. Keeping sane when you have pointers all around you is hard (then again, are we really sane in the first place?). I see no bigger problems for porting other interfaces to IDispatch. We could use $riid parameter of GetIDsOfNames of IDispatch to pass function pointer of different interface to Invoke. Peace of cake, right? _UnprotectMemory($riid, 4) DllStructSetData(DllStructCreate("ptr", $riid), 1, DllStructGetData($tInterface, $sName)) Then in Invoke collect all parameters and just use function like _D3D9_Call() to call method. Should I go for it? ProgAndy? (I said I'll ask you) Edited January 31, 2010 by trancexx ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
JRowe Posted January 31, 2010 Share Posted January 31, 2010 Peace of cake, right? Is that anything like the Tao of pie?Also, This is great! [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
ProgAndy Posted February 1, 2010 Share Posted February 1, 2010 Maybe do not replace the vTable-Entries since this destroys the functions located at postion 6 and 7 of the vTable. I think it would be better to create a Wrapper object that has the original object as property. *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
trancexx Posted February 1, 2010 Author Share Posted February 1, 2010 (edited) Maybe do not replace the vTable-Entries since this destroys the functions located at postion 6 and 7 of the vTable. I think it would be better to create a Wrapper object that has the original object as property.No it doesn't. New object is created. Check there.edit Saving the old functions pointers and then calling them before returning from modified - if required methods are placed at 6th or 7th place of the object tags (RegExp)? Edited February 1, 2010 by trancexx ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Minikori Posted February 1, 2010 Share Posted February 1, 2010 Run. Gives errors. Then I see this:x86 only.FUUUUUUUUUAny screen shots of what this does so I can see? For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com Link to comment Share on other sites More sharing options...
monoceres Posted February 1, 2010 Share Posted February 1, 2010 Run. Gives errors. Then I see this:FUUUUUUUUUAny screen shots of what this does so I can see?Just run it as x86. You always get x86 version of autoit when installing. Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
Minikori Posted February 2, 2010 Share Posted February 2, 2010 (edited) Just run it as x86. You always get x86 version of autoit when installing.Oh yeah well now I get this error:---------------------------AutoIt Error---------------------------Line 416 (File "C:\Users\minikori\Desktop\DirectX.au3"):Local Static $tCode = _AllocateExeCode(58)Local ^ ERRORError: No variable given for "Dim", "Local", "Global", "Struct" or "Const" statement.---------------------------OK --------------------------- Edited February 2, 2010 by Minikori For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com Link to comment Share on other sites More sharing options...
JRowe Posted February 2, 2010 Share Posted February 2, 2010 What version are you using? It appears that you're not recognizing the Static keyword appropriately. You may need to update to the latest version of AutoIt. [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
Minikori Posted February 2, 2010 Share Posted February 2, 2010 (edited) What version are you using? It appears that you're not recognizing the Static keyword appropriately. You may need to update to the latest version of AutoIt.I feel quite stupid today . We need an auto check for updates.EDIT: Okay now when ran nothing happens for a few seconds then it crashes :| Edited February 2, 2010 by Minikori For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com Link to comment Share on other sites More sharing options...
wraithdu Posted February 2, 2010 Share Posted February 2, 2010 FYI, 'Static' support is still very beta and partially broken even in 3.3.5.1. For example, the help file Static example fails when it tries to redim the static array (known issue). Link to comment Share on other sites More sharing options...
trancexx Posted February 2, 2010 Author Share Posted February 2, 2010 FYI, 'Static' support is still very beta and partially broken even in 3.3.5.1. For example, the help file Static example fails when it tries to redim the static array (known issue).My?Static is there for testing, because it needs testing.Script can do without it. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
wraithdu Posted February 2, 2010 Share Posted February 2, 2010 Huh? Nothing specific, just info for the others discussing it who didn't know what it was. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now