Jump to content

Authenticity

MVPs
  • Posts

    2,592
  • Joined

  • Last visited

  • Days Won

    1

Authenticity last won the day on October 15 2011

Authenticity had the most liked content!

1 Follower

About Authenticity

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Authenticity's Achievements

Universalist

Universalist (7/7)

20

Reputation

  1. Mind to run and post the output of this script? #include <Constants.au3> #include <String.au3> #include <WinAPI.au3> Local $hIEFrame = WinGetHandle('[CLASS:IEFrame]') Local $avChildren _WinListChildren($hIEFrame, $avChildren) ConsoleWrite(_WinAPI_GetClassName($hIEFrame) & "(" & $hIEFrame & ') - "' & ControlGetText($hIEFrame, "", 0) & '"' & @CRLF) For $i = 1 To $avChildren[0][0] ConsoleWrite(_StringRepeat(" ", $avChildren[$i][1]) & "|--" & _ _WinAPI_GetClassName($avChildren[$i][0]) & "(" & $avChildren[$i][0] & ') - "' & _ ControlGetText($avChildren[$i][0], "", 0) & '" [' & WinGetState($avChildren[$i][0]) & "]" & @CRLF) Next Func _WinListChildren($hParent, ByRef $avArr, $iDepth = 0) If UBound($avArr, 0) <> 2 Then Local $avTmp[10][2] = [[0]] $avArr = $avTmp EndIf Local $hChild = _WinAPI_GetWindow($hParent, $GW_CHILD) If $hChild Then $iDepth += 2 While $hChild If $avArr[0][0]+1 > UBound($avArr, 1)-1 Then ReDim $avArr[$avArr[0][0]+10][2] $avArr[$avArr[0][0]+1][0] = $hChild $avArr[$avArr[0][0]+1][1] = $iDepth $avArr[0][0] += 1 _WinListChildren($hChild, $avArr, $iDepth) $hChild = _WinAPI_GetWindow($hChild, $GW_HWNDNEXT) WEnd ReDim $avArr[$avArr[0][0]+1][2] EndIf EndFunc Just the tree output.
  2. Thanks for taking your time to test this miserable attempt. This one is tested on IE8. Works on IE7 hopefully: #include <Constants.au3> #include <IE.au3> #include <WinAPI.au3> Local $oIE Local $hIEFrame = WinGetHandle("[CLASS:IEFrame]") Local $hChild = _WinAPI_GetWindow($hIEFrame, $GW_CHILD) Local $hIEServer, $hTmp Local $sClass While $hChild $sClass = _WinAPI_GetClassName($hChild) If $sClass = "Frame Tab" And BitAND(WinGetState($hChild), 2) Then $hTmp = ControlGetHandle($hChild, "", "[CLASS:TabWindowClass]") $hTmp = ControlGetHandle($hTmp, "", "[CLASS:Shell DocObject View]") $hIEServer = ControlGetHandle($hTmp, "", "[CLASS:Internet Explorer_Server]") ExitLoop EndIf $hChild = _WinAPI_GetWindow($hChild, $GW_HWNDNEXT) WEnd If $hIEServer Then $oIE = __IEControlGetObjFromHWND($hIEServer) ConsoleWrite(_IEPropertyGet($oIE, "title") & @CRLF) Else ConsoleWrite("! failed" & @CRLF) EndIf
  3. UEZ's thread is probably a great source of enlightening examples and solutions. #include <GDIPlus.au3> #include <ScreenCapture.au3> _GDIPlus_Startup() Local $hBmp = _ScreenCapture_Capture("", 0, 0, -1, -1, False) Local $hBitmap = _GDIPlus_BitmapCreateFromHBITMAP($hBmp) _WinAPI_DeleteObject($hBmp) ; Skew or shear matrix: ; [ 1 0 0 ] ; identity ; Hx(s) = [ s 1 0 ] ; x = x + sy ; [ 0 0 1 ] ; identity or no translation ; [ 1 s 0 ] ; identity ; Hy(s) = [ 0 1 0 ] ; y = y + sx ; [ 0 0 1 ] ; identity or no translation ; [ 1 0 0 ] ; [ 0.25 1 0 ] ; [ 0 0 0 ] Local $nShear = 0.25 ; shear by 25% Local $hShearMtx = _GDIPlus_MatrixCreate2(1, 0, 0.25, 1, 0, 0) Local $iW, $iH $iW = _GDIPlus_ImageGetWidth($hBitmap) $iH = _GDIPlus_ImageGetHeight($hBitmap) Local $hNewBitmap = _GDIPlus_BitmapCreateFromScan0($iW, $iH) Local $hGraphics = _GDIPlus_ImageGetGraphicsContext($hNewBitmap) _GDIPlus_GraphicsSetTransform($hGraphics, $hShearMtx) _GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap, 0, 0) _GDIPlus_ImageSaveToFile($hNewBitmap, @ScriptDir & "\shear25px.bmp") _GDIPlus_MatrixDispose($hShearMtx) $hShearMtx = _GDIPlus_MatrixCreate2(1, 0.25, 0, 1, 0, 0) _GDIPlus_GraphicsSetTransform($hGraphics, $hShearMtx) _GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap, 0, 0) _GDIPlus_ImageSaveToFile($hNewBitmap, @ScriptDir & "\shear25py.bmp") ; Cleanup. _GDIPlus_GraphicsDispose($hGraphics) _GDIPlus_BitmapDispose($hNewBitmap) _GDIPlus_MatrixDispose($hShearMtx) _GDIPlus_BitmapDispose($hBitmap) _GDIPlus_Shutdown() Func _GDIPlus_BitmapCreateFromScan0($iWidth, $iHeight, $iStride = 0, $iPixelFormat = 0x0026200A, $pScan0 = 0) Local $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromScan0", "int", $iWidth, "int", $iHeight, "int", $iStride, "int", $iPixelFormat, "ptr", $pScan0, "int*", 0) If @error Or $aResult[0] Then Return SetError(1, 0, 0) Return $aResult[6] EndFunc Func _GDIPlus_MatrixCreate2($nM11, $nM12, $nM21, $nM22, $nDX, $nDY) Local $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateMatrix2", "float", $nM11, "float", $nM12, "float", $nM21, "float", $nM22, "float", $nDX, "float", $nDY, "int*", 0) If @error Or $aResult[0] Then Return SetError(1, 0, 0) Return $aResult[7] EndFunc
  4. You need to change the encoding under File -> Encoding -> UTF-8. #include <GUIConstantsEx.au3> GUICreate("test") GUICtrlCreateButton("▲", 0, 0) GUICtrlCreateButton("▼", 0, 25) GUISetState() Do Until GUIGetMsg() = $GUI_EVENT_CLOSE
  5. #include <GDIPlus.au3> #include <Memory.au3> #include <ScreenCapture.au3> Opt("MustDeclareVars", 1) _GDIPlus_Startup() Local $hBmp = _ScreenCapture_Capture() Local $hBitmap = _GDIPlus_BitmapCreateFromHBITMAP($hBmp) _WinAPI_DeleteObject($hBmp) Local $sEncoderCLSID = _GDIPlus_EncodersGetCLSID("jpg") Local $tEncoderCLSID = _WinAPI_GUIDFromString($sEncoderCLSID) Local $pEncoderCLSID = DllStructGetPtr($tEncoderCLSID) Local $pStream = _WinAPI_CreateStreamOnHGlobal(0) _GDIPlus_ImageSaveToStream($hBitmap, $pStream, $pEncoderCLSID) _GDIPlus_BitmapDispose($hBitmap) Local $hMem = _WinAPI_GetHGlobalFromStream($pStream) Local $iSize = _MemGlobalSize($hMem) Local $pMem = _MemGlobalLock($hMem) Local $tData = DllStructCreate("byte[" & $iSize & "]", $pMem) Local $xData = DllStructGetData($tData, 1) _MemGlobalFree($hMem) Local $S_ip = InputBox("please input ipaddress", "please input ipaddress", @IPAddress1) Local $S_Port = 65432 TCPStartup() Local $socket = TCPConnect($S_ip, $S_Port) If $socket <> -1 Then For $i = 0 To Int($iSize / 65536) TCPSend($socket, BinaryMid($xData, $i * 65536 + 1, 65536)) Next TCPCloseSocket($socket) EndIf TCPShutdown() _GDIPlus_Shutdown() Func _GDIPlus_ImageSaveToStream($hImage, $pStream, $pEncoder, $pParams = 0) Local $aResult = DllCall($ghGDIPDll, "uint", "GdipSaveImageToStream", "ptr", $hImage, "ptr", $pStream, "ptr", $pEncoder, "ptr", $pParams) If @error Then Return SetError(1, 0, 0) Return SetError($aResult[0] <> 0, 0, $aResult[0] = 0) EndFunc Func _WinAPI_CreateStreamOnHGlobal($hGlobal, $fDeleteOnRelease = 1) Local $aResult = DllCall("ole32.dll", "uint", "CreateStreamOnHGlobal", "ptr", $hGlobal, "bool", $fDeleteOnRelease, "ptr*", 0) If @error Or $aResult[0] Then Return SetError(1, 0, 0) Return $aResult[3] EndFunc Func _WinAPI_GetHGlobalFromStream($pStream) Local $aResult = DllCall("ole32.dll", "uint", "GetHGlobalFromStream", "ptr", $pStream, "ptr*", 0) If @error Or $aResult[0] Then Return SetError(1, 0, 0) Return $aResult[2] EndFunc
  6. #include <AutoItObject.au3> #include <IE.au3> #include <WinAPI.au3> Opt("MustDeclareVars", 1) Global Const $tagVARIANT = "int[4];" ;=============================================================================== #interface "IAccessible" Global Const $sIID_IAccessible = "{618736e0-3c3d-11cf-810c-00aa00389b71}" ; Definition Global $dtagIAccessible = $dtagIDispatch & _ "get_accParent hresult(ptr*);" & _ "get_accChildCount hresult(int*);" & _ "get_accChild hresult(int;int;int;int;ptr*);" & _ "get_accName hresult(int;int;int;int;ptr*);" & _ "get_accValue hresult(int;int;int;int;ptr*);" & _ "get_accDescription hresult(int;int;int;int;ptr*);" & _ "get_accRole hresult(int;int;int;int;ptr);" & _ "get_accState hresult(int;int;int;int;ptr);" & _ "get_accHelp hresult(int;int;int;int;ptr*);" & _ "get_accHelpTopic hresult(ptr*;int;int;int;int;int*);" & _ "get_accKeyboardShortcut hresult(int;int;int;int;ptr*);" & _ "get_accFocus hresult(ptr);" & _ "get_accSelection hresult(ptr);" & _ "get_accDefaultAction hresult(int;int;int;int;ptr*);" & _ "accSelect hresult(int;int;int;int;int);" & _ "accLocation hresult(int*;int*;int*;int*;int;int;int;int);" & _ "accNavigate hresult(int;int;int;int;int;ptr);" & _ "accHitTest hresult(int;int;ptr);" & _ "accDoDefaultAction hresult(int;int;int;int);" & _ "put_accName hresult(int;int;int;int;ptr);" & _ "put_accValue hresult(int;int;int;int;ptr);" ; List Global $ltagIAccessible = $ltagIDispatch & _ "get_accParent;" & _ "get_accChildCount;" & _ "get_accChild;" & _ "get_accName;" & _ "get_accValue;" & _ "get_accDescription;" & _ "get_accRole;" & _ "get_accState;" & _ "get_accHelp;" & _ "get_accHelpTopic;" & _ "get_accKeyboardShortcut;" & _ "get_accFocus;" & _ "get_accSelection;" & _ "get_accDefaultAction;" & _ "accSelect;" & _ "accLocation;" & _ "accNavigate;" & _ "accHitTest;" & _ "accDoDefaultAction;" & _ "put_accName;" & _ "put_accValue;" ;=============================================================================== _AutoItObject_Startup() Global $hOLEACC = DllOpen("oleacc.dll") Global $oMyError = ObjEvent("AutoIt.Error", "_ErrFunc") Global $hIEFrame = WinGetHandle("[CLASS:IEFrame]") Global $oIE = _IEAttachActiveTab($hIEFrame) If Not @error Then ConsoleWrite(_IEPropertyGet($oIE, "title") & @CRLF) _IENavigate($oIE, "www.autoitscript.com", False) EndIf DllClose($hOLEACC) _AutoItObject_Shutdown() ; No error checkings -whatsoever- Func _IEAttachActiveTab($hWnd) Local Const $OBJID_CLIENT = 0xFFFFFFFC Local Const $CHILDID_SELF = 0 Local Const $ROLE_SYSTEM_PAGETABLIST = 60 Local Const $STATE_SYSTEM_SELECTED = 2 Local $oAccObj, $oTabs, $oTab Local $tTabs, $tTab, $tSelfChild Local $tTabRole, $pTabRole, $tTabState, $pTabState ;~ Local $pBSTR, $sStr Local $iAccChildren, $iTabChildren, $iSelectedTab Local $hTab Local $aResult ; Get a handle to the tabs UI control. $hTab = ControlGetHandle($hWnd, "", "[CLASS:DirectUIHWND]") $oAccObj = _AutoItObject_WrapperCreate(_AccessibleObjectFromWindow($hTab, $OBJID_CLIENT, $sIID_IAccessible), $dtagIAccessible) $aResult = $oAccObj.get_accChildCount(0) $iAccChildren = $aResult[1] $tTabs = _AccessibleChildren($oAccObj.__ptr__, 0, $iAccChildren) ; A VARIANT that specifies to query information of -this- object $tSelfChild = DllStructCreate($tagVARIANT) DllStructSetData($tSelfChild, 1, $__Au3Obj_VT_I4, 1) DllStructSetData($tSelfChild, 1, $CHILDID_SELF, 2) $tTabRole = DllStructCreate($tagVARIANT) $pTabRole = Number(DllStructGetPtr($tTabRole)) $tTabState = DllStructCreate($tagVARIANT) $pTabState = Number(DllStructGetPtr($tTabState)) $iSelectedTab = -1 For $i = 1 To $iAccChildren ; If VARIANT.pdispVal has information then proceed. ; if (vTabs[i].vt == VT_DISPATCH) If BitAND(DllStructGetData($tTabs, $i, 1), 0xFFFF) = $__Au3Obj_VT_DISPATCH Then ; Get an object interface. $oTabs = _AutoItObject_WrapperCreate(DllStructGetData($tTabs, $i, 3), $dtagIAccessible) ; Retrieve information that describes the role of the object. $oTabs.get_accRole(DllStructGetData($tSelfChild, 1, 1), _ DllStructGetData($tSelfChild, 1, 2), _ DllStructGetData($tSelfChild, 1, 3), _ DllStructGetData($tSelfChild, 1, 4), _ $pTabRole) ; If its role is to tab-list then proceed ; if (vTab.lVal == ROLE_SYSTEM_PAGETABLIST) If DllStructGetData($tTabRole, 1, 3) = $ROLE_SYSTEM_PAGETABLIST Then ; So this is a tab-list control, which in part is a container. ; Get child count. $aResult = $oTabs.get_accChildCount(0) $iTabChildren = $aResult[1] ; Retrieve IDispatch interfaces or child IDs of children. $tTab = _AccessibleChildren($oTabs.__ptr__, 0, $iTabChildren) For $j = 1 To $iTabChildren ; Get a tab object interface. $oTab = _AutoItObject_WrapperCreate(DllStructGetData($tTab, $j, 3), $dtagIAccessible) ; Get the tab object's name (for comparisons purpose, etc). ; Much like getting an internet explorer object's current title property. ;~ $aResult = $oTab.get_accName(DllStructGetData($tSelfChild, 1, 1), _ ;~ DllStructGetData($tSelfChild, 1, 2), _ ;~ DllStructGetData($tSelfChild, 1, 3), _ ;~ DllStructGetData($tSelfChild, 1, 4), _ ;~ 0) ; BSTR* (i.e., ptr*) ;~ $pBSTR = $aResult[5] ;~ $sStr = __Au3Obj_SysReadString($pBSTR) ;~ ConsoleWrite($sStr & @CRLF) ;~ __Au3Obj_SysFreeString($pBSTR) ; Get the current tab state. $oTab.get_accState(DllStructGetData($tSelfChild, 1, 1), _ DllStructGetData($tSelfChild, 1, 2), _ DllStructGetData($tSelfChild, 1, 3), _ DllStructGetData($tSelfChild, 1, 4), _ $pTabState) If BitAND(DllStructGetData($tTabState, 1, 3), $STATE_SYSTEM_SELECTED) Then $iSelectedTab = $j - 1 ExitLoop 2 EndIf Next EndIf EndIf Next If $iSelectedTab < 0 Then Return SetError(1, 0, -1) Return _IEAttach($hWnd, "hwnd", $iSelectedTab) EndFunc Func _AccessibleObjectFromWindow($hWnd, $iObjId, $sRefIID) Local $aResult, $tRefIID $tRefIID = _WinAPI_GUIDFromString($sRefIID) $aResult = DllCall($hOLEACC, "long", "AccessibleObjectFromWindow", "hwnd", $hWnd, "uint", $iObjId, "ptr", DllStructGetPtr($tRefIID), "ptr*", 0) If @error Or $aResult[0] Then Return SetError(1, 0 ,0) Return $aResult[4] EndFunc Func _AccessibleChildren($pAccContainer, $iChildStart, $iChildren) Local $tVARIANT, $pVARIANT Local $sStruct Local $aResult $sStruct = "" For $i = 1 To $iChildren $sStruct &= $tagVARIANT Next $tVARIANT = DllStructCreate($sStruct) $pVARIANT = DllStructGetPtr($tVARIANT) $aResult = DllCall($hOLEACC, "int", "AccessibleChildren", "ptr", $pAccContainer, "int", $iChildStart, "int", $iChildren, "ptr", $pVARIANT, "int*", 0) If @error Or $aResult[0] Then Return SetError(1, 0, 0) Return SetExtended($aResult[5], $tVARIANT) EndFunc Func _WindowFromAccessibleObject($pAccessible) Local $aResult = DllCall($hOLEACC, "int", "WindowFromAccessibleObject", "ptr", $pAccessible, "hwnd*", 0) If @error Or $aResult[0] Then Return SetError(1, 0, 0) Return $aResult[2] EndFunc Func _ErrFunc() ConsoleWrite("--- COM Error, number = " & Ptr($oMyError.number) & ", description: " & $oMyError.windescription) EndFunc Tested on IE7 only.
  7. #include <GDIPlus.au3> #include <GuiConstantsEx.au3> Local $hGUI = GUICreate("Virginia", @DesktopWidth, @DesktopHeight) GUISetState() _GDIPlus_Startup() Local $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) Local $hBitmap = _GDIPlus_BitmapCreateFromFile(@ScriptDir & "\virginia.jpg") _GDIPlus_BitmapSetResolution($hBitmap, 96, 96) _GDIPlus_ImageSaveToFile($hBitmap, @ScriptDir & "\virginia96DPI.jpg") Local $iTop _GDIPlus_BitmapSetResolution($hBitmap, 300, 300) $iTop = _GDIPlus_ImageGetHeight($hBitmap) _GDIPlus_GraphicsDrawImage($hGraphic, $hBitmap, 0, 0) _GDIPlus_BitmapSetResolution($hBitmap, 96, 96) _GDIPlus_GraphicsDrawImage($hGraphic, $hBitmap, 0, $iTop) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE _GDIPlus_BitmapDispose($hBitmap) _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_Shutdown() Func _GDIPlus_BitmapSetResolution($hBitmap, $nDpiX, $nDpiY) Local $aResult = DllCall($ghGDIPDll, "uint", "GdipBitmapSetResolution", "ptr", $hBitmap, "float", $nDpiX, "float", $nDpiY) If @error Then Return SetError(@error, @extended, False) Return SetError($aResult[0], 0, $aResult[0] = 0) EndFunc Changing the resolution does not change the physical size of the image.
  8. #include <GDIPlus.au3> _GDIPlus_Startup() Local $hImg = _GDIPlus_ImageLoadFromFile("tic_tac_toe.png") _GDIPlus_ImageRotateFlip($hImg, 1) _GDIPlus_ImageSaveToFile($hImg, "Test.png") _GDIPlus_ImageDispose($hImg) _GDIPlus_Shutdown() ; #FUNCTION# ==================================================================================================================== ; Name...........: _GDIPlus_ImageRotateFlip ; Description ...: Rotates and flips an image ; Syntax.........: _GDIPlus_ImageRotateFlip($hImage, $iRotateFlipType) ; Parameters ....: $hImage - Pointer to an Image object ; $iRotateFlipType - Type of rotation and flip: ; |0 - No rotation and no flipping (A 180-degree rotation, a horizontal flip and then a vertical flip) ; |1 - A 90-degree rotation without flipping (A 270-degree rotation, a horizontal flip and then a vertical flip) ; |2 - A 180-degree rotation without flipping (No rotation, a horizontal flip folow by a vertical flip) ; |3 - A 270-degree rotation without flipping (A 90-degree rotation, a horizontal flip and then a vertical flip) ; |4 - No rotation and a horizontal flip (A 180-degree rotation followed by a vertical flip) ; |5 - A 90-degree rotation followed by a horizontal flip (A 270-degree rotation followed by a vertical flip) ; |6 - A 180-degree rotation followed by a horizontal flip (No rotation and a vertical flip) ; |7 - A 270-degree rotation followed by a horizontal flip (A 90-degree rotation followed by a vertical flip) ; Return values .: Success - True ; Failure - False ; Remarks .......: None ; Related .......: None ; Link ..........; @@MsdnLink@@ GdipImageRotateFlip ; Example .......; No ; =============================================================================================================================== Func _GDIPlus_ImageRotateFlip($hImage, $iRotateFlipType) Local $aResult = DllCall($ghGDIPDll, "uint", "GdipImageRotateFlip", "hwnd", $hImage, "int", $iRotateFlipType) Return SetError($aResult[0], 0, $aResult[0] = 0) EndFunc ;==>_GDIPlus_ImageRotateFlip
  9. You people are just amazing. This library is so great that I pray for this project to be built-in into AutoIt, in some way. Code performance is quadrupled, literally. I guess it'll take some time until we see libraries exposing user-objects-only while hiding all the nasty procedural code, but these are the first steps toward. Keep up this good work.
  10. It's important, but if you haven't experienced a severe crash then I guess it can be on hold for now. I'm working on enhancing the effects examples to illustrate: animation, lighting, particle systems, and more. As well, I've rewrote the examples because I've changed some functions prototypes and returned values. In the next update, most functions that build an intrinsic type (such as a matrix) require a reference to a variable and return the new structure pointer. This is so the return value can be an argument for another function. Following Direct3D programming conventions.
  11. With a little twinking you can load 16 bit heightmap. The only requirement is that no header sections should exist in file. The file can be 32bits, big-endianess, little-e, or 4bits. This is why the scalar factor is there. If you want to load a 16bit heightmap you can change the following line in Terrain.au3: StringRegExp(StringTrimLeft($xData, 2), "..", 3) ; to StringRegExp(StringTrimLeft($xData, 2), ".{4}", 3) Then the VertsPerRow and VertsPerCol will be Sqrt($iFileSize/2) Edit: It's divide by 2 not 4. Anyway, I've found a mistake in the file that need a fix and upload.
  12. Seems quite realistic. Something is wrong with the heightsmap though. Using a Perlin noise, I manage to get smooth transitions and no overlapped triangles. Also, it's quite a bumpy terrain. Try using cell spacing of 15 and a scale factor of 3. It's about taste, so don't judge me. ;] Your next task is to implement a per-pixel lighting shader. It'll increase the realism of the terrain dramatically.
  13. Depending on the interface. You can draw on a full screen OpenGL application using DirectDraw. With Direct3D 8 and up full screen applications, you can't. This is when Microsoft changed the implementation of surface drawing, it was a DirectDraw surface back then. If the application's interface is OpenGL, you don't have to use any sort of hacks. If it's Direct3D 8+, you'll need to use some dll tricks. Google for "Layout Direct3D", you'll find something.
  14. Think of the mistake of creating an object inside a function, return a pointer to it's memory, but it's already released when function returns. Func D3DXVECTOR3($D3DXVECTOR3_1,$D3DXVECTOR3_2,$D3DXVECTOR3_3) $D3DXVECTOR3_temp = DllStructCreate("float 1;float 2;float 3") DllStructSetData($D3DXVECTOR3_temp,'1',$D3DXVECTOR3_1) DllStructSetData($D3DXVECTOR3_temp,'2',$D3DXVECTOR3_2) DllStructSetData($D3DXVECTOR3_temp,'3',$D3DXVECTOR3_3) Return DLLStructgetPtr($D3DXVECTOR3_temp) EndFunc Func D3DXVECTOR4($D3DXVECTOR4_1,$D3DXVECTOR4_2,$D3DXVECTOR4_3,$D3DXVECTOR4_4) $D3DXVECTOR4_temp = DllStructCreate("float 1;float 2;float 3;float 4") DllStructSetData($D3DXVECTOR4_temp,'1',$D3DXVECTOR4_1) DllStructSetData($D3DXVECTOR4_temp,'2',$D3DXVECTOR4_2) DllStructSetData($D3DXVECTOR4_temp,'3',$D3DXVECTOR4_3) DllStructSetData($D3DXVECTOR4_temp,'4',$D3DXVECTOR4_4) Return DLLStructgetPtr($D3DXVECTOR4_temp) EndFunc Should be: Func D3DXVECTOR3($D3DXVECTOR3_1,$D3DXVECTOR3_2,$D3DXVECTOR3_3) $D3DXVECTOR3_temp = DllStructCreate("float 1;float 2;float 3") DllStructSetData($D3DXVECTOR3_temp,'1',$D3DXVECTOR3_1) DllStructSetData($D3DXVECTOR3_temp,'2',$D3DXVECTOR3_2) DllStructSetData($D3DXVECTOR3_temp,'3',$D3DXVECTOR3_3) Return $D3DXVECTOR3_temp EndFunc Func D3DXVECTOR4($D3DXVECTOR4_1,$D3DXVECTOR4_2,$D3DXVECTOR4_3,$D3DXVECTOR4_4) $D3DXVECTOR4_temp = DllStructCreate("float 1;float 2;float 3;float 4") DllStructSetData($D3DXVECTOR4_temp,'1',$D3DXVECTOR4_1) DllStructSetData($D3DXVECTOR4_temp,'2',$D3DXVECTOR4_2) DllStructSetData($D3DXVECTOR4_temp,'3',$D3DXVECTOR4_3) DllStructSetData($D3DXVECTOR4_temp,'4',$D3DXVECTOR4_4) Return $D3DXVECTOR4_temp EndFunc ..then in the dllcall, make a temporary variable to hold and keep the vectors structures.
  15. @LoadJugag, Direct3D You're after rendering to another program's device I guess, right? If so, I have no clue if you can share the same render object without the other program explicitly specifying so. Other methods to achieve that have nothing to do with Direct3D as they are related to dll injection. What I mean is that only one -full screen- application can render to the device (excluding multiple monitors) at a present moment. I might be wrong, though.
×
×
  • Create New...