Page 4 of 5 FirstFirst 12345 LastLast
Results 121 to 160 of 180

Thread: Direct2D Typelib+ for VB6

  1. #121
    New Member
    Join Date
    Jul 2019
    Posts
    1

    Re: Direct2D Typelib+ for VB6

    Well , CreateDCRenderTarget and BindDC doesn't work properly ...
    oleviewer shows that the type of the second paramarray of BindDC can't read ...
    Error 32810(Unknown Error)

  2. #122
    Lively Member
    Join Date
    Jun 2016
    Posts
    106

    Re: Direct2D Typelib+ for VB6

    wrong post
    Last edited by xman2000; Dec 7th, 2020 at 01:52 AM.

  3. #123
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,575

    Re: Direct2D Typelib+ for VB6

    - can you share a load file, draw project?
    - can i get\set pixels using the HDC or hBitmap?
    VB6 2D Sprite control

    To live is difficult, but we do it.

  4. #124

    Thread Starter
    PowerPoster
    Join Date
    Dec 2014
    Posts
    2,112

    Re: Direct2D Typelib+ for VB6

    Direct2D uses ID2D1Bitmap not hBitmap.
    you can create a IWICBitmap from a hBitmap (CreateCompatibleBitmap) using the CreateBitmapFromHBITMAP from WICImagingFactory

    so its possible to copy a hBitmap to IWICBitmap and make it a ID2D1Bitmap that you can use to render.
    but why do you want to do that?

    better work with WIC/Direct2D

    I have never worked with pixel data,
    but theres tons of functions. check the property of each container and look into microsoft direct2d pages for information.

  5. #125
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,575

    Re: Direct2D Typelib+ for VB6

    my code is very slow
    VB6 2D Sprite control

    To live is difficult, but we do it.

  6. #126

  7. #127

    Thread Starter
    PowerPoster
    Join Date
    Dec 2014
    Posts
    2,112

    Re: Direct2D Typelib+ for VB6

    in Direct2D, what u do is to paint a ID2D1Bitmap, in any way u want, and after that render the entire ID2D1Bitmap to a picturebox/form.
    this should be very fast since you are working in GPU.

    so, you are saying you want to use a get/set pixel. why?
    are there any other way to draw? why do you need to get? is there a purpose for that?
    why can't you just load .png pictures and render those onto the screen, or use any functions, like rectangle, circle, polygons etc together with a brush of your choosing?

    any manual loop takes time,
    if you want to loop through the entire screen it will slow things down,
    its like, if I try to use a Sinc and Lanczos resampling it will takes a lot of time to do that. that is why I would never try to make such thing, at least not in a "real-time" situation.
    Direct2D offer Nearest-neighbor and linear interpolation so Im stuck with those.

    what I can do, is to use WIC, that offer WICBitmapInterpolationModeCubic that I use to resize on load, instead of real-time use of linear interpolation that is not as good.

  8. #128
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,575

    Re: Direct2D Typelib+ for VB6

    - we have a 3D plane(it's like a flat rectangle but on 3D world);
    - using that 4 3D points, i can get the left and right(both vertical) lines points;
    - using that points, we can have the origin and destination of the horizontal line;
    - know the horizontal line points, we can draw the image on a pixel way.
    that's why i need a pixel way... unless you can advice me a better method... and yes the 4 points can have Z different coordinates.
    the Stretchblt() API don't works, for draw the entire horizontal line, because the Z can be different.
    VB6 2D Sprite control

    To live is difficult, but we do it.

  9. #129

    Thread Starter
    PowerPoster
    Join Date
    Dec 2014
    Posts
    2,112

    Re: Direct2D Typelib+ for VB6

    working with 3D is much better with DirectX,
    we have directx9 typelib by the Trick, that can deal with such things and render it fast.
    Direct2D is suited for 2D work.

    not sure if this is enough, its quite new but it uses DirectX11, I would also look into it first and see if its enough:
    https://www.vbforums.com/showthread....0-Type-Library

    but theres a lot more for DirectX9
    if so check
    https://www.vbforums.com/showthread....-VB6-Direct3D9
    other threads of interests
    https://www.vbforums.com/showthread....601&viewfull=1
    https://www.vbforums.com/showthread....-getting-error

  10. #130
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,575

    Re: Direct2D Typelib+ for VB6

    the tutorial\book of directx9, will help me use these library? or the Trick have is own doc?
    VB6 2D Sprite control

    To live is difficult, but we do it.

  11. #131

    Thread Starter
    PowerPoster
    Join Date
    Dec 2014
    Posts
    2,112

    Re: Direct2D Typelib+ for VB6

    check the 3 threads that is all about DirectX9, theres sources to download and examples to check.
    theres no .pdf/.doc to download but theres tons of information if you check
    https://docs.microsoft.com/en-us/win...9/dx9-graphics

    even if the source code is not VB6, its almost the same since the name are the same.

  12. #132

  13. #133
    PowerPoster
    Join Date
    Jun 2013
    Posts
    6,350

    Re: Direct2D Typelib+ for VB6

    Quote Originally Posted by joaquim View Post
    - we have a 3D plane(it's like a flat rectangle but on 3D world);
    - using that 4 3D points, i can get the left and right(both vertical) lines points;
    - using that points, we can have the origin and destination of the horizontal line;
    - know the horizontal line points, we can draw the image on a pixel way.
    that's why i need a pixel way... unless you can advice me a better method... and yes the 4 points can have Z different coordinates.
    the Stretchblt() API don't works, for draw the entire horizontal line, because the Z can be different.
    The term you are looking for is "texture" (aka "some bitmap in a 3D-context")

    And the problem you want solved is the "bread-and-butter"-stuff in 3D-scenarios:
    Texture-Mapping (the mapping of Bitmap-Points to arbitrary 3D-Surface-Objects).
    https://en.wikipedia.org/wiki/Textur...exture_mapping

    As said already, better to use a library which has builtin support for it -
    any 3D-lib (OpenGL, DirectX, etc.) will offer you:
    - APIs to "upload a texture-bitmap into the GPU"
    - APIs to "bind an uploaded texture to some Surface-Object" (a bunch of vertices)

    Olaf
    Last edited by Schmidt; Dec 25th, 2020 at 03:47 AM.

  14. #134
    Fanatic Member
    Join Date
    Sep 2010
    Location
    Italy
    Posts
    619

    Re: Direct2D Typelib+ for VB6

    Quote Originally Posted by Schmidt View Post
    ...As said already, better to use a library which has builtin support for it -
    any 3D-lib (OpenGL, DirectX, etc.) will offer you:
    - APIs to "upload a texture-bitmap into the GPU"
    - APIs to "bind an uploaded texture to some Surface-Object" (a bunch of vertices)
    Olaf
    About OpenGL could someone tell me where to find the latest version (for VB6, with some useful tutorial)
    I did some research and failed.
    I have OpenGL API 2.0 tbl but it seems to me it does not support Fragment Shader GLSL language (which is what interests me the most)

    I am very interested in this, in fact I made a Raymarching renderer using DirectX11.
    I wanted to do it with OpenGL because I think it has a better language. But I don't find tutorials and examples.
    The most interesting thing I've found about OpenGL raymarching is a tutorial for Godot GameEngine. (which has a Shading Language very close to OpenGL)

    You can Download an example here of what I achieved (for now) using Godot.

    ps Merry Christmas to all !

  15. #135
    PowerPoster
    Join Date
    Jun 2013
    Posts
    6,350

    Re: Direct2D Typelib+ for VB6

    Quote Originally Posted by reexre View Post
    About OpenGL could someone tell me where to find the latest version (for VB6, with some useful tutorial)
    I did some research and failed.
    I have OpenGL API 2.0 tbl ...
    That's the version I have here as well (guess, nobody out there advanced it any further).
    But the good news is, that it is all "StdCall-able flat-APIs" - so, enhancements could be done via normal VB-Declares as well...

    Quote Originally Posted by reexre View Post
    I wanted to do it with OpenGL because I think it has a better language.
    But I don't find tutorials and examples.
    OpenGL is nice - and the primary lib for other platforms ...
    (DirectX would not be portable, therefore the 3D-classes of the RC6 will not be based on it).

    As for a decent (though still kept simple) tutorial - there is one (in german language) on ActiveVB.de (numbered from chapters 1 to 8).

    Below is a link to chapter3, which covers textures (which I plan to make uploadable, directly from Cairo-Surfaces)
    https://activevb.de/tutorials/opengl...tchapter3.html

    Here the google-translated link for english:
    https://translate.google.com/transla...tchapter3.html

    And (FWIW) also in italian:
    https://translate.google.com/transla...tchapter3.html


    Olaf

  16. #136
    Fanatic Member
    Join Date
    Sep 2010
    Location
    Italy
    Posts
    619

    Re: Direct2D Typelib+ for VB6

    Thanks! Very interesting tutorials! (Lot to learn from)

    OpenGL Typelib for VB6 doesn't seem to have the key functions to do what I want.
    For example those functions found in this link
    https://learnopengl.com/Getting-started/Shaders
    glGetUniformLocation (shaderProgram, "ourColor");
    glUseProgram (shaderProgram);

    (It'd be cool there was a more updated Typelib! )

    What I'm most interested in is not so much the usage of inherent functions but the utilization of GPU speed using a Shader Language.
    This for me has two main purposes:
    1) - The realization of Rendering with RayMarching technique (here done with Godot)
    2) - If possible the integration of mini programs written in Shader language (GLSL/HLSL) to be used in my image manipulation program. This would speed up some Effects immensely.

    As you can see in the examples already given.
    The graphic results are the result of a Shader programs.
    This is the HLSL for DirectX code used in the example RayMarching with DirectX11 (using wqweto typelib).
    In this other example (made with Godot) inside the WindowsExport-32.pck file (to open with some text editor) you can see (glimpse) the code used to draw the whole scene.

    For a raw speed comparison the same Scene rendered with pure VB6 takes about 1.30 -2.00 minutes per frame, while with GPU (Shader language) a fragment of a second per frame. (If I'm not mistaken something in the order of magnitude 1000X or more.)


    EDIT:

    I have accomplished task one (The realization of Rendering with RayMarching technique )
    using TrueVision3D as support.

  17. #137

    Thread Starter
    PowerPoster
    Join Date
    Dec 2014
    Posts
    2,112

    Re: Direct2D Typelib+ for VB6

    a OpenGL class would be really nice to have.
    a class we can simply add to any project and use it to draw lines, rectangles, bitmaps etc
    including a non-gdi loading function so we can load pictures into textures directly.
    not sure why nobody thought of that?

  18. #138

  19. #139
    PowerPoster
    Join Date
    Jun 2013
    Posts
    6,350

    Re: Direct2D Typelib+ for VB6

    ...seems that someone did it (HLSL image processing) 10 years ago...
    I'm already working on GLSL support for at least the Vertex- and Fragment-shaders -
    you can expect some results at the end of next week ...

    Olaf

  20. #140

  21. #141
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,575

    Re: Direct2D Typelib+ for VB6

    thank you so much.
    i never programmed DirectX... i have DirectX 9 tutorials, but are for C\C++.. and not VB6.. so what you can advice for i learn more?
    VB6 2D Sprite control

    To live is difficult, but we do it.

  22. #142
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,575

    Re: Direct2D Typelib+ for VB6

    from C++ - Beginning DirectX 9 book(it's for C\C++), we have:
    Code:
    LPDIRECT3D9 pD3D; // the Direct3D object
    LPDIRECT3DDEVICE9 pd3dDevice; // the Direct3D device
    but your library don't have these 2 types(LPDIRECT3D9 and LPDIRECT3DDEVICE9 ).... so how can i follow for learn it?
    VB6 2D Sprite control

    To live is difficult, but we do it.

  23. #143
    PowerPoster
    Join Date
    Feb 2015
    Posts
    2,318

    Re: Direct2D Typelib+ for VB6

    Quote Originally Posted by joaquim View Post
    thank you so much.
    i never programmed DirectX... i have DirectX 9 tutorials, but are for C\C++.. and not VB6.. so what you can advice for i learn more?
    You can use C++ tutorials. If you have questions you can ask them there (this thread also contains the examples) or create a new topic in the main section.

    Quote Originally Posted by joaquim View Post
    from C++ - Beginning DirectX 9 book(it's for C\C++), we have:
    Code:
    LPDIRECT3D9 pD3D; // the Direct3D object
    LPDIRECT3DDEVICE9 pd3dDevice; // the Direct3D device
    but your library don't have these 2 types(LPDIRECT3D9 and LPDIRECT3DDEVICE9 ).... so how can i follow for learn it?
    From MSDN:
    The LPDIRECT3DDEVICE9 and PDIRECT3DDEVICE9 types are defined as pointers to the IDirect3DDevice9 interface.

  24. #144
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,575

    Re: Direct2D Typelib+ for VB6

    i'm sorry, if i 'atack' your topic... but believe me that i'm not the only one getting these type initial problems.
    thank you so much for correct me.. and i saved that msnd link: https://docs.microsoft.com/en-us/win...pi/_direct3d9/
    and heres for who needs use the DirectX8(in VB 6): http://directx4vb.vbgamer.com/DirectX4VB/TUT_DX8_DG.asp
    now i can read that book without more problems
    thank you so much for all.. thank you... now i can start more easely... thanks
    readers: don't forget the DirectX8 and DirectX9 have their own vb library. don't forget forget add the library on References, on Project menu.
    VB6 2D Sprite control

    To live is difficult, but we do it.

  25. #145
    Fanatic Member
    Join Date
    Sep 2010
    Location
    Italy
    Posts
    619

    Re: Direct2D Typelib+ for VB6

    Quote Originally Posted by Schmidt View Post
    I'm already working on GLSL support for at least the Vertex- and Fragment-shaders -
    you can expect some results at the end of next week ...
    Olaf
    Good to know!
    I have made progress using TrueVision3D to handle the shader.
    All in all, the TrueVision3D tool is of a unique simplicity. (also for passing variables from VB6 to the shader)

    I take this opportunity to apologize for having gone a little off topic of this thread. (topics that I hope interesting anyway)

  26. #146

    Thread Starter
    PowerPoster
    Join Date
    Dec 2014
    Posts
    2,112

    Re: Direct2D Typelib+ for VB6

    yeah, its off topic,
    but I think its acceptable a few post here and there, since its about graphics and we all want VB6 to be able to use as much possible.
    but its better to make a new thread and continue in a thread with 3D in mind.

  27. #147
    Fanatic Member
    Join Date
    Sep 2010
    Location
    Italy
    Posts
    619

    Re: Direct2D Typelib+ for VB6

    Quote Originally Posted by Schmidt View Post
    I'm already working on GLSL support for at least the Vertex- and Fragment-shaders -
    you can expect some results at the end of next week ...
    Olaf
    Hi,
    do you have something ready about it ?
    If yes ( or when you have it) please post it in this other thread (or a your own thread) (... not to be off topic here)

  28. #148
    New Member
    Join Date
    Jun 2022
    Posts
    1

    Re: Direct2D Typelib+ for VB6

    Dear Sirs,

    I'm first time here. I''m vba Programmer - I'm coding mostly Microsoft Access and sometimes Microsoft Excel. I'm very impressed by examples provided code provided here.

    I'm wondering - will it be possible to adapt this type library to be used also with Microsoft Access forms? Currently I'm using clsPictureBox written by Stephen Lebans
    but this one works with GDI32....and on modern computer the GDI32 is working very slow.

    Kindly please let me know your opionion.

  29. #149
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    516

    Re: Direct2D Typelib+ for VB6

    hi guys i downloaded direct 2d samples from this threads No #40 , #53 , #64 from "the trick" and in alls samples this error in "save image" sample (windows 8 64 bit)
    i see in that sample used "OLEEXP - olelib With Modern Interfaces by fafalone, v4.3"
    i cound not find verion 4.3 but i did try by these versions and error :




    image link : https://postimg.cc/Z0SpnMBj
    how can fix that ?
    [ ... active on skype and discord ... ] ,[always strive to achieve your dreams] , [always try,dont stop,never say never]

  30. #150

    Thread Starter
    PowerPoster
    Join Date
    Dec 2014
    Posts
    2,112

    Re: Direct2D Typelib+ for VB6

    tRect what is that?
    u maybe need to use the same structure from the right typelib.

    remember that u can tell exactly where u get "rect"
    example:
    Dim tRect As oleexp.Rect
    will use oleexp.Rect and not from whatever in the priority list.
    try changing it using another typelibs. (check F2 to see all the typelib in use)
    sometimes the IDE is confusing and will not understand.
    Last edited by baka; Dec 2nd, 2022 at 05:27 PM.

  31. #151
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    3,681

    Re: Direct2D Typelib+ for VB6

    Weird, the version of the Direct2D library that loads when I open it has

    Sub BindDC(hDC As Long)
    Member of D2DVBLib.ID2D1DCRenderTarget


    No RECT member at all. Check exactly what it's expecting there. If it's a type mismatch, it might expecting a LPRECT instead, in which case object browser would show a Long as the 2nd argument and you'd pass VarPtr(tRect).

    I really, really doubt it matters since the RECT definition has remained unchanged since the earliest version of the project oleexp was forked from (and a type library isn't like an active-x control or DLL; it shouldn't matter which version you're using unless the exact thing you're using has been changed-- which seems to be the case with the BindDC call in different versions of the Direct2D TLB), but if you wanted to try I'll attach v4.3
    Attached Files Attached Files

  32. #152

    Thread Starter
    PowerPoster
    Join Date
    Dec 2014
    Posts
    2,112

    Re: Direct2D Typelib+ for VB6

    also, not sure what u are doing, when I decide a render target I do:

    Code:
        With HwndRenderTargetProperties
            .Hwnd = Main.area.Hwnd
            .pixelSize.Width = 800
            .pixelSize.Height = 600
            .presentOptions = D2D1_PRESENT_OPTIONS_NONE
        End With
    
        With RenderTargetProperties
            .pixelFormat.Format = DXGI_FORMAT_UNKNOWN
            .pixelFormat.alphaMode = D2D1_ALPHA_MODE_UNKNOWN
            .usage = D2D1_RENDER_TARGET_USAGE_NONE
            .minLevel = D2D1_FEATURE_LEVEL_DEFAULT
            If SoftWare Then .Type = D2D1_RENDER_TARGET_TYPE_SOFTWARE Else .Type = D2D1_RENDER_TARGET_TYPE_HARDWARE
        End With
        Set hTarget = cFactory.CreateHwndRenderTarget(RenderTargetProperties, HwndRenderTargetProperties)
    thats my initialization.
    why do u need to Bind?

  33. #153
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    516

    Re: Direct2D Typelib+ for VB6

    Quote Originally Posted by baka View Post
    tRect what is that?
    u maybe need to use the same structure from the right typelib.

    remember that u can tell exactly where u get "rect"
    example:
    Dim tRect As oleexp.Rect
    will use oleexp.Rect and not from whatever in the priority list.
    try changing it using another typelibs. (check F2 to see all the typelib in use)
    sometimes the IDE is confusing and will not understand.

    I didn't write any code, I just opened the sample code named "Save Image" attached in the threads #40 , #53 from "the trick" :

    and it gave an error(i did show in image before), in that version it was necessary to use version 4.3, but I didn't have version 4.3 and tested with other and newer versions. I did that it doesn't work


    Now the question that has arisen is how can I coordinate this project with the newer version 5.1 of oleexp.
    Last edited by Black_Storm; Dec 4th, 2022 at 01:32 PM.
    [ ... active on skype and discord ... ] ,[always strive to achieve your dreams] , [always try,dont stop,never say never]

  34. #154
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    516

    Re: Direct2D Typelib+ for VB6

    Quote Originally Posted by fafalone View Post
    Weird, the version of the Direct2D library that loads when I open it has

    Sub BindDC(hDC As Long)
    Member of D2DVBLib.ID2D1DCRenderTarget


    No RECT member at all. Check exactly what it's expecting there. If it's a type mismatch, it might expecting a LPRECT instead, in which case object browser would show a Long as the 2nd argument and you'd pass VarPtr(tRect).

    I really, really doubt it matters since the RECT definition has remained unchanged since the earliest version of the project oleexp was forked from (and a type library isn't like an active-x control or DLL; it shouldn't matter which version you're using unless the exact thing you're using has been changed-- which seems to be the case with the BindDC call in different versions of the Direct2D TLB), but if you wanted to try I'll attach v4.3

    yes thanks its work now but am i use just 4.3 version only? just download that samples from "the trick" in thread no #40 , #53 , i guess #53 is last update version and run "save Image" project with newer versions of oleexp like as 5.1,the question that has arisen is how can I coordinate this project with the newer version, 5.1?
    Last edited by Black_Storm; Dec 4th, 2022 at 01:32 PM.
    [ ... active on skype and discord ... ] ,[always strive to achieve your dreams] , [always try,dont stop,never say never]

  35. #155
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    516

    Re: Direct2D Typelib+ for VB6

    Quote Originally Posted by baka View Post
    also, not sure what u are doing, when I decide a render target I do:

    Code:
        With HwndRenderTargetProperties
            .Hwnd = Main.area.Hwnd
            .pixelSize.Width = 800
            .pixelSize.Height = 600
            .presentOptions = D2D1_PRESENT_OPTIONS_NONE
        End With
    
        With RenderTargetProperties
            .pixelFormat.Format = DXGI_FORMAT_UNKNOWN
            .pixelFormat.alphaMode = D2D1_ALPHA_MODE_UNKNOWN
            .usage = D2D1_RENDER_TARGET_USAGE_NONE
            .minLevel = D2D1_FEATURE_LEVEL_DEFAULT
            If SoftWare Then .Type = D2D1_RENDER_TARGET_TYPE_SOFTWARE Else .Type = D2D1_RENDER_TARGET_TYPE_HARDWARE
        End With
        Set hTarget = cFactory.CreateHwndRenderTarget(RenderTargetProperties, HwndRenderTargetProperties)
    thats my initialization.
    why do u need to Bind?

    can you just open that save image project from thread #40 , #53.i guess #53 is last updated and just Change the project to be compatible with oleexp newer versions like as 5.1?
    Last edited by Black_Storm; Dec 4th, 2022 at 01:31 PM.
    [ ... active on skype and discord ... ] ,[always strive to achieve your dreams] , [always try,dont stop,never say never]

  36. #156
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    3,681

    Re: Direct2D Typelib+ for VB6

    Quote Originally Posted by Black_Storm View Post
    I didn't write any code, I just opened the sample code named "Save Image" attached in the threads #40 , #53 from "the trick" :

    and it gave an error(i did show in image before), in that version it was necessary to use version 4.3, but I didn't have version 4.3 and tested with other and newer versions. I did that it doesn't work


    Now the question that has arisen is how can I coordinate this project with the newer version 5.1 of oleexp.
    Your problem isn't the oleexp version, it's the Direct2D TLB version. Check the reference, you must have another one on your system that got loaded instead of the version that came with the project.

    Use the Object Browser, navigate to the ID2D1DCRenderTarget interface, and look at what arguments it's expecting for BindDC. It's obviously not expecting a RECT, and there's no difference whatsoever between the RECT in oleexp 4.3 and the one in 5.1. And I posted 4.3 in Post #151 just so you could rule that out even though I'm 99.99% sure that's not the problem here.

  37. #157
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    516

    Re: Direct2D Typelib+ for VB6

    I did not say that the problem is from new versions of oleexp but I asked there is a way to make the trick project compatible with the newer version 5.1 if that direct 2d of the trick is old? i asked frm baka too

    the question that has arisen is how can I coordinate this project with the newer version, 5.1?
    because It seems that the only way to use the trick project (save image project) is to use version 4.1 of oleexp.i answered in #154 about ur post in#151 about used 4.3,and of course, I had checked in the reference, it is already the same file in Project Trick,if that direct2d tlb (D2DVB.tlb) is old any new version available introduce me to download new direct tlb version ? because I couldn't find any other version and i just use that version attached in project #53 of trick.

    did u try open the tick project in no #53 and check with new versions like as oleexp 4.7 or 5.1? if works for u so can attach ur direct 2d tlb version used? if not how can change code to can work with new version of 5.1 oleexp as i asked before too.

    i attach again here to can download and check it from the trick attached:
    Attached Files Attached Files
    [ ... active on skype and discord ... ] ,[always strive to achieve your dreams] , [always try,dont stop,never say never]

  38. #158
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    3,681

    Re: Direct2D Typelib+ for VB6

    Apologies, I've never seen a bug like this before, it's truly bizarre. It's looking like D2DVB must have imported oleexp, and the object browser simply omits the 2nd argument in the object browser when there's a binary incompatibility between the tlb it was compiled against and the current TLB version, which makes it look like a completely definition than it actually is.

    This won't be correctable without the source of D2DVB.tlb, which wasn't included, or a good deal of cleanup of the source generated by OLEView.

    That's a big problem with importlib statements in TLBs... even completely unrelated minor changes to the TLB import break the TLB that imports it. I've encountered somewhat similar issues before and my only conclusion is that instead of reference the type like RECT, it just uses some raw byte offset into the TLB so if the definition moves, it breaks. Edit: This does indeed seem to the case as when you load D2DVB in OLEView it loads a memory mapped section of oleexp.tlb, but can't recognize the TLB or it's types... it's basically like instead of 'Import RECT from oleexp', it's saying 'Import type at offset 0x12345678', so if it's not byte-for-byte identical, it doesn't understand it.

    If The trick could post the IDL source, it would simply need to be compiled again with the current version of oleexp in SysWOW64.

  39. #159
    PowerPoster
    Join Date
    Feb 2015
    Posts
    2,318

    Re: Direct2D Typelib+ for VB6

    There are conflicts with the newer versions of oleexp regarding to WIC. The new oleexp already has WIC declarations which are incompatible with wicvb.tlb. I can't compile this TLB because of UUID redefinitions and this TLB requires some OLEEXP types.

    ADDED:

    The sources of the typelib are in the attachment. I've updated the references to OLEEXP5.1 but wicvb.tlb won't work so SaveImage project won't work too. You could remove wicvb.tlb from the references and use OLEEXP interfaces declarations instead with the small modifications of the code.
    Attached Files Attached Files

  40. #160
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    3,681

    Re: Direct2D Typelib+ for VB6

    Shouldn't the original wicvb.tlb work if it's higher in the priority list than oleexp? Any definitions in 2 TLBs resolve to the one higher in the list, so "IWICImagingFactory" would resolve to "wicvb.IWICImagingFactory" if that was higher in the list. Or do you mean that had an importlib(oleexp) too so can't recompile?

Page 4 of 5 FirstFirst 12345 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width