Page 1 of 2 12 LastLast
Results 1 to 40 of 41

Thread: [RESOLVED] DirectComposition in vb?

  1. #1

    Thread Starter
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    575

    Resolved [RESOLVED] DirectComposition in vb?

    hi,I have no experience in using DirectComposition in VB, does anyone have an example in this case, I am asking this question in the following thread:

    Thread: How to take a picture from the back of the form while the form is being displayed to?

    Probably DirectComposition is only supported in Windows 8 or Windows 10 and above, and I am not sure about this.
    [ ... active on skype and discord ... ] ,[always strive to achieve your dreams] , [always try,dont stop,never say never]

  2. #2

    Thread Starter
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    575

    Re: DirectComposition in vb?

    It may not be possible in VB6 or there is just no example ?!!!
    [ ... active on skype and discord ... ] ,[always strive to achieve your dreams] , [always try,dont stop,never say never]

  3. #3
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,625

    Re: DirectComposition in vb?

    It's certainly possible but you'd have to prepare a typelibrary with the interfaces; I don't think anyone has done this yet (The trick has done Direct2D and DirectWrite).

  4. #4

    Thread Starter
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    575

    Re: DirectComposition in vb?

    In fact, this was his suggestion in this post (post 50) :
    How to take a picture from the back of the form while the form is being displayed to? - Page 2-VBForums

    I guess The trick is either working on this suggestion or he hasn't seen this post yet.
    I hope to find an example for this method as well.
    [ ... active on skype and discord ... ] ,[always strive to achieve your dreams] , [always try,dont stop,never say never]

  5. #5
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,625

    Re: DirectComposition in vb?

    The DirectX interfaces are defined in an *extremely* VB-unfriendly way, so creating a typelib is a fairly significant project. Even moreso in my case; it's taken 8 hours so far converting The trick's d2d/dw TLBs to MKTYPLIB-compatible syntax to merge them with oleexp (to reduce conflicts since they depend on oleexp).

  6. #6

    Thread Starter
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    575

    Re: DirectComposition in vb?

    In my opinion this method can be useful in beautiful and professional UI design, especially since this method has started in new windows. I heard and researched a little about it, considering that Trick is proficient in other languages such as C, I think he has experience in this case.

    just to design some simple 3D effects (just for for show hide like as transitions) that I was following in the links below, I had to to use opengl while I had to work with layers and controls at the same time.


    Thread: any body can help about design this 3d rotate contents and then this slide effect?

    Thread: [RESOLVED] open gl and layered window?

    Thread: [RESOLVED] How can take screen shot of special area outside of desktop?

    Thread: How to take a picture from the back of the form while the form is being displayed to?

    Thread: [RESOLVED] how can the execution speed of loop be the same for different systems(Used OpenGL)

    Thread: how we can make like as this burning effect?


    and etc ...

    most of my questions in these few months have been about designing beautiful forms as layers and combined with beautiful effects,i still work on opengl
    but if I can test this method, perhaps it is possible to design more professional user interfaces just for another chance.maybe a good result can be reached here
    Last edited by Black_Storm; Feb 4th, 2023 at 11:42 PM.
    [ ... active on skype and discord ... ] ,[always strive to achieve your dreams] , [always try,dont stop,never say never]

  7. #7
    The Idiot
    Join Date
    Dec 2014
    Posts
    2,720

    Re: DirectComposition in vb?

    of what I know, the Trick is using windows 7.
    DirectComposition need at least 8.1 to work.
    sure u could have a check, if 8.1+ u enable it.
    but if u want to make a program that works in windows 7 as well u should try another approach.

    the direct2d that I use (a typelib the Trick created) is usable from windows 7
    that means, not all features are there. some features where added in 8/10 and those dont work.
    I asked about it and the Trick answered me that he is in W7.

    maybe in the far future if we all move to windows 10 he will update it, but when he do, it could mean it will not work in windows 7 if anyone is still using it.
    Last edited by baka; Feb 5th, 2023 at 12:17 AM.

  8. #8
    Addicted Member -Franky-'s Avatar
    Join Date
    Dec 2022
    Location
    Bremen Germany
    Posts
    222

    Re: DirectComposition in vb?

    Hi. You don't necessarily need a TLB to work with COM interfaces. Almost all of my projects and examples (Direct2D/3D, WIC, MediaFoundation, WinRT, etc.) that work with COM interfaces do not use a TLB because there is either no TLB for VB6 or I don't feel like looking for a suitable TLB. I don't like waiting for someone to provide a TLB for it. I always use the DispCallFunc API. This may be very time-consuming and confusing for some, but so far, with a few exceptions, I've gotten everything to work with it.

  9. #9
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,625

    Re: DirectComposition in vb?

    Sure you can do it that way but it's far more complicated and time consuming than using a TLB, and the resulting code vastly more difficult to read/write.

  10. #10
    Addicted Member -Franky-'s Avatar
    Join Date
    Dec 2022
    Location
    Bremen Germany
    Posts
    222

    Re: DirectComposition in vb?

    Quote Originally Posted by fafalone View Post
    Sure you can do it that way but it's far more complicated and time consuming than using a TLB, and the resulting code vastly more difficult to read/write.
    That's right, but what do there are no TLBs?

  11. #11

  12. #12
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,625

    Re: DirectComposition in vb?


  13. #13

  14. #14
    Addicted Member -Franky-'s Avatar
    Join Date
    Dec 2022
    Location
    Bremen Germany
    Posts
    222

    Re: DirectComposition in vb?

    Quote Originally Posted by The trick View Post
    Do a TLB?
    That was good. I expected this answer. If I have some time, I'll take a look at how to create a TLB. Like I said, I've never used it before. So the answer is more in the direction of Black_Storm.

  15. #15

    Thread Starter
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    575

    Re: DirectComposition in vb?

    in Following this path, we can see the following links, which are samples , on different dates:

    Why use DirectComposition?

    DirectCompositionuild build 2013


    github samples :

    How to build a simple visual (tree 2018)

    Windows Interface Composition Engine ("Wice")

    DirectCompositionLayeredChildWindow (This sample was created for Windows 8.1 and/or Windows Server 2012 R2 using Visual Studio 2013)

    directcomp

    and many other examples ...
    still unfortunately, there is still no example in Google about using it in vb(considering its many uses).

    also, I created a question here, just to continue this thread and in a separate form, which may not be unrelated to this section
    Thread: Is there any UI engine like as Windows Interface Composition Engine ("Wice") ?

    Last edited by Black_Storm; Feb 6th, 2023 at 12:29 PM.
    [ ... active on skype and discord ... ] ,[always strive to achieve your dreams] , [always try,dont stop,never say never]

  16. #16
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,625

    Re: DirectComposition in vb?

    Well it's just a question of doing the tedious work of getting all the interfaces into a typelib, going through them to replace vb-incompatible types with compatible ones (i.e. you need to change all unsigned multibyte types to signed), then compiling. It's not difficult, just time consuming. The C++ examples you linked would be easy to port. Pretty ironic C/C++ is closer to VB6 than VB.NET.

  17. #17

    Thread Starter
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    575

    Re: DirectComposition in vb?

    It seems that you mean in such a situation that there is still no exe source code sample in VB, this is the only way to make tlb, did I understand your meaning correctly?

    If yes, then now the question is how to make a TLB in VB, I have already searched this question in the forum and for example I saw this answer:

    - Start VB6 Project.
    - Under Project/Project1 Properties..., change it to an ActiveX DLL.
    - Add a standard module and put a Sub Main in it.
    - Add a Class1 module.
    - Under Project/Project1 Properties... again, go to the "Components" tab and check "Remote Server Files".
    - Compile the project.
    - Voila, a Project1.tlb file appears.

    Of course, I did a test, but still the TLB file was dependent on its own DLL and it didn't work without registering the DLL inside the project, in a better case, how can you make a TLB without depending on the compiled DLL? Inside VB and of course I did not find any project about TLB in VB.

    Or I saw in Trick's portfolio that he is creating TLBs with like as C/C++ language, so I should use another language for this purpose?
    [ ... active on skype and discord ... ] ,[always strive to achieve your dreams] , [always try,dont stop,never say never]

  18. #18
    The Idiot
    Join Date
    Dec 2014
    Posts
    2,720

    Re: DirectComposition in vb?

    u need to create the TLB
    using notepad, u create a .ODL file
    and after that u use MKTYPLIB.EXE to compile it into .TLB
    and now u can reference it.
    example of a ODL I created awhile ago:
    Code:
    [uuid(75BEEE99-1CD9-4E32-A749-3565C64E3F75)]
    library OTHER
    {
        typedef unsigned char BYTE;
    
        typedef struct _BLENDFUNCTION {
            BYTE BlendOp;
            BYTE BlendFlags;
            BYTE SourceConstantAlpha;
            BYTE AlphaFormat;
        } BLENDFUNCTION;    //, *PBLENDFUNCTION, *LPBLENDFUNCTION
    
        typedef struct tagSAFEARRAY1D {
    	short cDims;
    	short fFeatures;
    	long cbElements;
    	long cLocks;
    	long pvData;
    	long cElements1D;
    	long lLbound1D;
        } SAFEARRAY1D;
    (and more..)

  19. #19
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,625

    Re: DirectComposition in vb?

    For something like this yes you're going to need to use IDL; vb6 creates typelibs as part of Active-X controls/DLLs, but VB6 lacks the syntax to precisely control what's in them, and it would be 1000x the effort for something like DirectComposition.

    Look at a simple TLB for a start.

    If you have Krool's VBCCR project, open the OLEGuids folder. OLEGuids.odl is the source file; it's plain text, open it in Notepad.

    Then open up the SDK source files (e.g. OleIdl.idl) to see the differences... you'll see it's virtually identical, just some differences in types because VB6 doesn't support everything, and removal of a few attributes like pointer_default(unique) so it can be compiled with MKTYPLIB (which is something OLEGuids and oleexp have to worry about, but if you wanted to make a standalone typelib you could use the more modern midl so long as you weren't including low-level base COM/OLE interfaces and sticking to things like DirectComposition).


    All the interfaces you define have to be inside the header:

    Code:
    [
    	uuid(5A2B9220-BF07-11E6-9598-0800200C9A66),
    	helpstring("OLE Guid and interface definitions"),
    	lcid(0x0),
    	version(1.0)
    ]
    
    library OLEGuids
    {
        importlib("stdole2.tlb"); //All TLBs compiled with MKTYPLIB must have this; if you're compiling with midl it force-includes it and others no matter what. NO MATTER WHAT.
    
        //interfaces go here
    };
    For the GUID inside the uuid attribute, you have to generate a new unique one for your project. Visual Studio comes with a utility called GUIDGEN.exe to do this.

    If you're creating a larger typelib, you can split things into multiple files, and use #include, look at oleexp.odl in the oleexp.tlb source to see an example of this.

    For compiling, you use the command line. For example oleexp has a batch file to compile, mkex4s.bat:

    "C:\Program Files (x86)\Microsoft Visual Studio\VC98\Bin\MKTYPLIB.exe" "oleexp.odl"

    OLEGuids and oleexp are a good place to start; DirectX stuff isn't written so simple. There was no particular reason for Microsoft to obfuscate it so much... it has to get compiled down to the same thing... if I was more conspiracy minded I'd think it was for the exclusive purpose of making it harder to use in VB6...

    After you understand the basics of typelibs better have a look at the sources for The trick's Direct2D and DirectWrite tlbs, which he attached to this post.

    Edit: Looks like directcomp is in the same format as those, easiest way might be to add them to that.
    Last edited by fafalone; Feb 7th, 2023 at 06:01 AM.

  20. #20
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,625

    Re: DirectComposition in vb?

    Alright I'm adding directcomposition to oleexp...

    Anyone know what this is:
    Code:
    HRESULT SetClip(
      [in, ref] const D2D_RECT_F & rect
    );
    Is it ByVal RECT or ByRef? Need to know because MKTYPLIB doesn't understand that syntax so won't automatically handle it (and I'd have to workaround a byval).

  21. #21

  22. #22
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,625

    Re: DirectComposition in vb?

    Thanks, two more...

    how to handle 2-d array? Normally for 2d even in a UDT doesn't it convert it to SAFEARRAY? It's showing it correctly in the object browser, i'll have to see if it's really a fixed regular array.

    Code:
    typedef struct DXGI_DISPLAY_COLOR_SPACE
    {
        FLOAT PrimaryCoordinates[8][2];
        FLOAT WhitePoints[16][2];
    } 	DXGI_DISPLAY_COLOR_SPACE;
    Then, there's some that appear to be overloads:

    Code:
    interface IDCompositionVisual : stdole.IUnknown
    
    {
        // Changes the value of OffsetX property
        HRESULT SetOffsetX(
            [in] float offsetX
            );
    
        // Animates the value of the OffsetX property.
        HRESULT SetOffsetX(
            [in] IDCompositionAnimation* animation
            );
    Is this actual overloading, i.e. they're at the same v-table offset, or they're different vtable entries and I can rename them? (MKTYPLIB errors with 'duplicate definition')
    Last edited by fafalone; Feb 8th, 2023 at 12:10 AM.

  23. #23
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,625

    Re: DirectComposition in vb?

    Ok here's a test version of oleexp with DXGI and DirectComposition interfaces/structs/enums

    It's also in tbShellLib if you want to try in twinBASIC... quicker and easier to edit issues as it's in VB-style syntax, e.g.
    Code:
        [ InterfaceId ("BB8A4953-2C99-4F5A-96F5-4819027FA3AC") ]
        [ OleAutomation (False) ]
        Interface IDCompositionSurface Extends stdole.IUnknown
            Sub BeginDraw(ByRef updateRect As RECT, ByRef iid As UUID, ByRef updateObject As Any, ByRef updateOffset As POINT)
            Sub EndDraw()
            Sub SuspendDraw()
            Sub ResumeDraw()
            Sub Scroll(ByRef scrollRect As RECT, ByRef clipRect As RECT, ByVal offsetX As Long, ByVal offsetY As Long)
        End Interface
    and doesn't need outside compilation (also supports x64)
    Last edited by fafalone; Feb 9th, 2023 at 02:44 PM.

  24. #24

  25. #25

    Thread Starter
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    575

    Re: DirectComposition in vb?

    Quote Originally Posted by fafalone View Post
    Ok here's a test version of oleexp with DXGI and DirectComposition interfaces/structs/enums

    It's also in tbShellLib if you want to try in twinBASIC... quicker and easier to edit issues as it's in VB-style syntax, e.g.
    Code:
        [ InterfaceId ("BB8A4953-2C99-4F5A-96F5-4819027FA3AC") ]
        [ OleAutomation (False) ]
        Interface IDCompositionSurface Extends stdole.IUnknown
            Sub BeginDraw(ByRef updateRect As RECT, ByRef iid As UUID, ByRef updateObject As Any, ByRef updateOffset As POINT)
            Sub EndDraw()
            Sub SuspendDraw()
            Sub ResumeDraw()
            Sub Scroll(ByRef scrollRect As RECT, ByRef clipRect As RECT, ByVal offsetX As Long, ByVal offsetY As Long)
        End Interface
    and doesn't need outside compilation (also supports x64)
    Thanks, can you attach an example of using Direct Composition with the help of this library (tlb) that has been tested?
    one question: considering that I have no experience in using Direct composition, does this library cover all the issues related to this discussion or is it currently being tested, which includes a limited number of functions and definitions and should Was it waiting for it to be more complete?


    Of course, this topic can remain open because it seems that it can make better progress.
    [ ... active on skype and discord ... ] ,[always strive to achieve your dreams] , [always try,dont stop,never say never]

  26. #26
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,625

    Re: DirectComposition in vb?

    Yeah im going to port the example with the layered child window, but it uses media foundation interfaces and I had basic ones but not the one it used, so I'm working on adding an expanded set. I'll finish that tonight but give me another day or two for the example because the latest version of tB can compile my ucShellBrowse control to work in 64bit VBA and .NET WinForms, I'll be busy playing with that tonight 😄

    The Dcomp interfaces are a complete set.

  27. #27

    Thread Starter
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    575

    Re: DirectComposition in vb?

    Hello, what's up, is there a sample not prepared?
    [ ... active on skype and discord ... ] ,[always strive to achieve your dreams] , [always try,dont stop,never say never]

  28. #28
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,625

    Re: DirectComposition in vb?

    Well first the sample used some media foundation stuff I thought was already in oleexp, but it wasn't, so I finished adding all that.

    Then today I found some Direct3D 11 interfaces in the sample, and while The trick has a D3D 9 typelib, there's no D3D 11 typelib for VB6, so the past couple days I've been working on that, but it takes time.

    ...if you're not satisfied with the speed I'm converting 10s of thousands of lines of headers to VB6-compatible typelib syntax in preparation for porting a sample, I'd be happy to make it my full time job and get it done much faster, my rate is $200/hr.

  29. #29

    Thread Starter
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    575

    Re: DirectComposition in vb?

    I was just waiting to see if you will prepare the usage sample according to the time you announced, but it seems not yet,its okay if need more time.
    Of course, it should be noted that since the beginning of this thread, not a single sample has been prepared yet.i understand maybe because this is new in vb6 and new windows versions.

    If you want to talk about the cost, even if I was willing to make the payment, but considering the conditions of the country and the sanctions, it was not easy, and this problem is not only for payments to communicate with any person outside the country, but this The problem has a long story and even to pay for any foreign site we have problems here.
    Anyway, thanks for your time on this.

    My question still remains here because this question has not yet had a practical example , we most talked about changes and how to design and etc.
    I was hoping that more guys would work in this field and show interest, but it seems that either they haven't entered newer Windows yet, or they don't have experience working with it, so the work has been stopped.

    If a practical example is not found, unfortunately, I have to change the topic as solved without results.
    Last edited by Black_Storm; Feb 13th, 2023 at 01:09 AM.
    [ ... active on skype and discord ... ] ,[always strive to achieve your dreams] , [always try,dont stop,never say never]

  30. #30
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    5,093

    Re: DirectComposition in vb?

    Quote Originally Posted by fafalone View Post
    Then today I found some Direct3D 11 interfaces in the sample, and while The trick has a D3D 9 typelib, there's no D3D 11 typelib for VB6, so the past couple days I've been working on that, but it takes time.
    Btw, I posted a link to DirectX 11 typelib above but please let OP add the missing interfaces. I’m not willing to support his demands for free labor too.

  31. #31
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,625

    Re: DirectComposition in vb?

    Ah didn't see that. Damn, would have saved me a ton of work... But I did finish 100% of both the d3d and dxgi stuff, including all the GUIDs.

    --
    Yes I'm still planning to do the sample but can't promise a timeframe, it depends on what difficulties I run into.

  32. #32

    Thread Starter
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    575

    Re: DirectComposition in vb?

    I also did not create this free thread with the aim of someone wanting to earn income from here , while someone like him (wqweto) wants to be hired somewhere to solve a problem , it is up to him.He has already received his answer and it is useless for him to repeat it.

    It seemed that based on the thread he came and made some changes free and hinted and left. I hope it was useful for him too.

    Of course, it has been found that it is useful in completing some libraries and improving them, and this is good.
    [ ... active on skype and discord ... ] ,[always strive to achieve your dreams] , [always try,dont stop,never say never]

  33. #33

    Thread Starter
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    575

    Re: DirectComposition in vb?

    Quote Originally Posted by fafalone View Post
    Yes I'm still planning to do the sample but can't promise a timeframe, it depends on what difficulties I run into.
    cool,i understand,hope to get a result soon
    I was sure that if the trick is entered, it will do great things as always, but it's a pity that according to Baka's previous tips, the trick is busy in Windows 7 (I'm not sure).
    Last edited by Black_Storm; Feb 13th, 2023 at 08:34 PM.
    [ ... active on skype and discord ... ] ,[always strive to achieve your dreams] , [always try,dont stop,never say never]

  34. #34
    Frenzied Member
    Join Date
    Jun 2015
    Posts
    1,042

    Re: DirectComposition in vb?

    Quote Originally Posted by Black_Storm View Post
    I also did not create this free thread with the aim of someone wanting to earn income from here , while someone like him (wqweto) wants to be hired somewhere to solve a problem , it is up to him.He has already received his answer and it is useless for him to repeat it.
    To me it sounded more like if the free help was not respected or appreciated and demands for further help were made then free help is no longer appropriate because they are not slaves who can be ordered to work for free.

  35. #35
    Frenzied Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    1,289

    Re: DirectComposition in vb?

    Mr wqweto share some of the best open source code for all of us and he is not deserve to handle him with the way Black_Storm did.

  36. #36

    Thread Starter
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    575

    Re: DirectComposition in vb?

    Quote Originally Posted by dz32 View Post
    To me it sounded more like if the free help was not respected or appreciated and demands for further help were made then free help is no longer appropriate because they are not slaves who can be ordered to work for free.
    Many of these are like that, there is no need for their help, they can go and show their help elsewhere, sometimes slaves are worth more than this.and of course, the value of money is sometimes more than such people

    Quote Originally Posted by georgekar View Post
    Mr wqweto share some of the best open source code for all of us and he is not deserve to handle him with the way Black_Storm did.
    Like this person(miss wqweto,It is more like women than men) already got their answer and can go on sharing while laughing, not even worth talking to.
    [ ... active on skype and discord ... ] ,[always strive to achieve your dreams] , [always try,dont stop,never say never]

  37. #37

    Thread Starter
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    575

    Re: DirectComposition in vb?

    This section was declared resolved so as not to continue with this stupid talk, anyone who is interested can follow this practical topic elsewhere, although I think that even now, if it has helped to expand the library It was useful (whether it was a related library of that slave) or those who worked on this discussion here like fafaolne, those working on new windows can follow this interesting and useful discussion elsewhere.
    [ ... active on skype and discord ... ] ,[always strive to achieve your dreams] , [always try,dont stop,never say never]

  38. #38
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,625

    Re: [RESOLVED] DirectComposition in vb?

    So just to update... I finished adding Direct3d 11 and 12 to oleexp, started in on the dcomp demos, only to find a number of interface dependencies from Direct2D, and that The trick's library only covered about 25% of Direct2D, and it will take a few days to get through the remaining 10k or so lines of interfaces/structs/enums before I can get back to the demo. So this is the kind of unanticipated thing that delays it when I only have a few hours a day for all of my programming projects, of which this is just one. (And no, I'm not just going to take the bits I need for the demo, because unless you're paying me, I'm doing what interests me, which is having comprehensive coverage of this in oleexp so people who see the demos and want to go further have everything available).
    Last edited by fafalone; Feb 15th, 2023 at 09:23 AM.

  39. #39

  40. #40
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,625

    Re: [RESOLVED] DirectComposition in vb?

    Just to update, I am still working on this-- I'm going to start testing in the next few days; right now I've converted the entire sample here:

    https://github.com/microsoft/Windows...ositionEffects

    and verified the basic window creation; now I'm just adding detailed logging for when the first runs inevitably go wrong, and double/triple checking everything, since I'm not going to be able to run from the IDE.

    I'm doing it in twinBASIC first since that has a feature that makes this easier-- it allows passing null pointers to UDT params in APIs, which is helpful because I had to remove all the "optional" tags since MKTYPLIB doesn't support it at all and neither VB nor TB supports Optional followed by non-Optional. I'm probably going to have to revise the oleexp.tlb defs to make the optional UDTs "As Any" so it's possible to pass a null pointer, the only workaround for this possible in VB6.

    If you want to do the super-fun error correction/debugging yourself, I'm attaching the project I'm working on. Note you can run in a single thread by changing the startup object to Sub Main and modifying PostLog to not use the critical section, and commenting out the CoInitialize/CoUninitialize calls in RunDCompEffects; my plan is to eventually have multiple samples in the app each running in their own thread.
    Last edited by fafalone; Aug 20th, 2023 at 07:20 AM.

Page 1 of 2 12 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