Page 11 of 11 FirstFirst ... 891011
Results 401 to 422 of 422

Thread: [VB6] Modern Shell Interface Type Library - oleexp.tlb

  1. #401
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,040

    Re: [VB6] Modern Shell Interface Type Library - oleexp.tlb

    I don't understand. Why are you talking about me? I haven't left a message on this subject for a long time. I think the type Kuti currency file has two versions of 64 bit and 32 bit.

    It would be even better if there was a way to extract parts of the TLB for different needs.
    Because a 5mb TLB is not very convenient to carry after all.
    Sometimes Excel, 64-bit and 32-bit, needs a small amount of functions.
    The TLB needs to be registered successfully before it can be referenced in Excel.

    Pecially the TLB files generated by the VB net DLL. Do not know whether it can be used without importing the registry?

  2. #402

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    6,819

    Re: [VB6] Modern Shell Interface Type Library - oleexp.tlb

    Nobody has mentioned you here in months, there's still no 64bit oleexp (and there probably won't be), and it's silly complaining about a few mb when every else requires hundreds of MB if not GB of SDKs, frameworks, or libraries. It's an open source project if you want to just use some small part, the source is there.

  3. #403
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,040

    Re: [VB6] Modern Shell Interface Type Library - oleexp.tlb

    It would be nice if twinbasic supported automatically extracting a function or module from a project.
    For example, the Enterprise Control has a total of 30 files. If I only need a text box control for Unicode.Redundant modules and lines of code are automatically removed.
    Is a function or a module that depends on which APIs declare DLLs or other functions.
    If you need to compile some of the TLB types separately. It is not known which dependencies he used. Maybe ai can handle it automatically in the future.

    Is the current chatGPT, it can not directly import hundreds of kb or even several megabytes of source code, and then it automatically clean up the redundant code.

  4. #404

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    6,819

    Re: [VB6] Modern Shell Interface Type Library - oleexp.tlb

    This thread is about oleexp.tlb, not twinBASIC features.

  5. #405
    Fanatic Member
    Join Date
    Jul 2017
    Posts
    666

    Re: [VB6] Modern Shell Interface Type Library - oleexp.tlb

    I do use TwinBasic if I "have to", I am subscriber, but its editor (the one I currently use is from Dec 2024) is a real pain to use unfortunately. It behaves like the .NET editor. It is just slow and does nasty things.
    I will fully switch to TwinBasic fully once I can work with it as fast as in VB6.

  6. #406

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    6,819

    Re: [VB6] Modern Shell Interface Type Library - oleexp.tlb

    There were some IDE performance issues after the first releases in December that were fixed in recent builds; but other than that not sure what you mean... nasty things? Personally I love all the modern features the VB6 IDE lacks. I work a lot faster with things like regions, code folding, advanced info popup, global search that displays all results at a glance, all the issues detected before running you can jump to with a click, the IDE not throwing up a message box on every syntax error, etc. It's a little bit of an adjustment but well worth it.

    If something you're working on is causing the IDE to be slow, please file a bug report.

  7. #407
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,923

    Re: [VB6] Modern Shell Interface Type Library - oleexp.tlb

    Quote Originally Posted by tmighty2 View Post
    ... TwinBasic... editor is a real pain to use unfortunately. It behaves like the .NET editor. It is just slow and does nasty things.
    Don't complain in general, raise specific issues on github here, https://github.com/twinbasic/twinbasic/issues. My experience is that many of our suggestions or bugs raised are being definitely being addressed. There is no chance your voice will be heard if you just moan that the IDE is a real pain. I've raised several so far, feel free to raise your own.
    https://github.com/yereverluvinunclebert

    Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.

    By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  8. #408
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,040

    Re: [VB6] Modern Shell Interface Type Library - oleexp.tlb

    Why hasn't Wayne released the official version yet? It means that it is constantly adding new features to make it more compatible with VB6. It is like a child of all of us. If everyone could contribute to the cost, the development would be faster and Wayne would have enough money to recruit new employees.Without increasing the volume of the program as much as possible. Make up for some of the most important shortcomings of returning to B6. Become a more advanced and convenient programming language, which can be used in 51 or newer computer systems. Currently, his program is only 30 megabits. Maybe version 2, version 3, it will go up to 300 megabytes, two gigabytes.

    It's a little off topic. But I hope you can know more people. In the past, the administrator of this forum liked to delete all the topics about special qualifications and transfer them to the corner where no one saw them at all.Now we should all think of it as a VB6 IDE. Upgrade version.

    As someone said a few days ago, it is too difficult to add some new sections in this forum. Maybe this forum will go bankrupt in two years.With the rapid development of the Internet and AI, it is more and more difficult for traditional websites to make money, and it is only a matter of time before they are closed. It is possible that all the source code will be lost directly, and he will not copy it to us.

  9. #409
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,923

    Re: [VB6] Modern Shell Interface Type Library - oleexp.tlb

    It is VERY off topic.
    https://github.com/yereverluvinunclebert

    Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.

    By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  10. #410
    Fanatic Member
    Join Date
    Jul 2017
    Posts
    666

    Re: [VB6] Modern Shell Interface Type Library - oleexp.tlb

    Quote Originally Posted by tmighty2 View Post
    I noticed that even though I deleted a variable named "y" in code, it would still compile.
    Then I noticed that "y" is declared as a constant in oleexp.
    This was not intended, right?

    Attachment 193716
    Hi! I guess you have forgotten to remove "y" from oleexp.SIOI_Flags.
    It's still present in oleexp66-core.zip.

    Edit: Hmm, I guess I misunderstood something in the versioning as I just noticed that oleexpimp.tlb's last edit date was 2024-06-07 in the oleexp66-core.zip.
    Edit2: Sorry, I completed confused the edit year 2024 with 2025.

    Edit3: In your first post you state that people requiring an update due to a bug should not compile their own version but instead contact you. May I ask you if you could update oleexpimp.tlb?

    I believe I am struggeling with a math problem where your "y" (which is 0) is being used, but I don't find the exact spot without having an updated oleexpimp.tlb.

    It's in "\source\exp_security.odl"
    SI_NO_TREE_APP,Y = 0x00000400,

    Thank you very much.
    Last edited by tmighty2; Feb 5th, 2025 at 08:58 AM.

  11. #411

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    6,819

    Re: [VB6] Modern Shell Interface Type Library - oleexp.tlb

    Your edits are right .. 6.6 is from June 2024, no updates since. I'll post 6.7 this week... But the y in the typelib would only be used if you don't have y declared in your own code. In the screenshot you posted, should you maybe be using the uTop variable in the arguments instead of y?

    If not, Dim y As Long: y = (correct value) will override the typelib in that method. Or Public y As Long in a .bas to override project-wide.

    As it stands right now, an updated tlb without y but no code changes would change nothing without Option Explicit, or with it result in an undefined variable error. That's why I hadn't been considering it a high enough priority for an unplanned update. But still, there's a number of other pending additions and fixes so I'll still aim for this week.
    Last edited by fafalone; Feb 5th, 2025 at 10:16 AM.

  12. #412
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,040

    Re: [VB6] Modern Shell Interface Type Library - oleexp.tlb

    webview2 ICoreWebView2 is nothing

    why use LongPtr??
    CreateCoreWebView2EnvironmentWithOptions(browserExecutableFolder As LongPtr, UserDataFolder As LongPtr, environmentOptions As ICoreWebView2EnvironmentOptions, environmentCreatedHandler As ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler) As Long



    Implements oleexp.ICoreWebView2CreateCoreWebView2ControllerCompletedHandler
    Private Sub ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_Invoke(ByVal errorCode As Long, ByVal createdController As oleexp.ICoreWebView2Controller)



    dim Web As oleexp.ICoreWebView2
    Set Web = createdController.CoreWebView2
    'it's error
    If Web Is Nothing Then???



    Private Sub ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_Invoke(ByVal errorCode As Long, ByVal createdEnvironment As oleexp.ICoreWebView2Environment)

    Set Ob_ControllerCompletedHandler = New WebViewLib

    createdEnvironment.CreateCoreWebView2Controller ParentWindow, Ob_ControllerCompletedHandler
    'it's ok
    End Sub

  13. #413
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,040

    Re: [VB6] Modern Shell Interface Type Library - oleexp.tlb

    maybe lost get_Bounds method?

    Code:
       [propget]
        HRESULT _stdcall get_Bounds(
                        [out, retval] long boundsLeft, 
                        [out, retval] long boundsTop, 
                        [out, retval] long boundsRight, 
                        [out, retval] long boundsBottom);
        [propput]
        HRESULT _stdcall put_Bounds(
                        [in] long boundsLeft, 
                        [in] long boundsTop, 
                        [in] long boundsRight, 
                        [in] long boundsBottom);
    Attached Images Attached Images  
    Attached Files Attached Files

  14. #414

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    6,819

    Re: [VB6] Modern Shell Interface Type Library - oleexp.tlb

    Ah right I forgot.

    There's a bug in MKTYPLIB. The property get is present in the source, but it's dropped when compiling. Some weird bug where you can't have a method with "get" in the name if it's a propget.

    I actually fixed that and some other bugs but I wanted to finish some other things... I don't know when I'll officially release 6.7 but here's a patched version of 6.6 with the bug fixes I've done so far:

    Code:
    -Added CompressedFolder coclass that creates an instance of the Zip Folder extension; replaces CoCreateInstance of {E88DCCE0-B7B3-11d1-A9F0-00AA0060FA31}.
    -(Bug fix) MFCreateADTMediaSink should be MFCreateADTSMediaSink
    -(Bug fix) IMFMediaType.GetMajorType, IQueueCommand methods used stdole.GUID instead of UUID, leading to automation type incompatible errors.
    -(Bug fix) IPropertyBag2::Read/Write last args should be ByRef.
    -(Bug fix) A bug in mktyplib silently dropped interfaces with [propget] commented out or starting with get_; this resulted in many WebView2
               interfaces being broken. Methods with ByVal POINT/RECT property lets have been renamed e.g.
               pgtPointerDeviceRect(ByRef RECT) (was retval)
               pptPointerDeviceRect([in] LONG pointerDeviceRectLeft, [in] LONG pointerDeviceRectTop, ...
               pgt is a Property Get, ppt Property Let.
    -(Bug fix) SHCreateMemStream definition incorrect.
    -(Bug fix) ITransferAdviseSink bugs
    -(Bug fix) SI_NO_TREE_APPLY name typo
    The naming restrictions were *insane*... I tried everything reasonable but now they're no longer Property Get/Let, they're separate

    Code:
            HRESULT pgtBounds([out] RECT* bounds); 
            HRESULT pptBounds([in] LONG boundsLeft, [in] LONG boundsTop, [in] LONG boundsRight, [in] LONG boundsBottom);
    Attached Files Attached Files

  15. #415
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,040

    Re: [VB6] Modern Shell Interface Type Library - oleexp.tlb

    Maybe you need to write a tool to automatically detect if the number of interfaces is missing?Or even if the data type has been changed?

  16. #416
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,040

    Re: [VB6] Modern Shell Interface Type Library - oleexp.tlb

    Quote Originally Posted by fafalone View Post
    Ah right I forgot.

    There's a bug in MKTYPLIB. The property get is present in the source, but it's dropped when compiling. Some weird bug where you can't have a method with "get" in the name if it's a propget.

    I actually fixed that and some other bugs but I wanted to finish some other things... I don't know when I'll officially release 6.7 but here's a patched version of 6.6 with the bug fixes I've done so far:


    The naming restrictions were *insane*... I tried everything reasonable but now they're no longer Property Get/Let, they're separate

    Code:
            HRESULT pgtBounds([out] RECT* bounds); 
            HRESULT pptBounds([in] LONG boundsLeft, [in] LONG boundsTop, [in] LONG boundsRight, [in] LONG boundsBottom);
    WebView2 Win32 C++ ICoreWebView2 | Microsoft Learn
    https://learn.microsoft.com/en-us/mi..._documenttitle

    The title for the current top-level document.

    public HRESULT get_DocumentTitle(LPWSTR * title)

    If the document has no explicit title or is otherwise empty, a default that may or may not match the URI of the document is used.

    The caller must free the returned string with CoTaskMemFree. See API Conventions.

    CAN RESULT IS A vb6 STRING?

    your tlb return a long type "DocumentTitle"

    Code:
    HRESULT GetDocumentTitle(ICoreWebView2* webView, std::wstring& title) {
     
        if (!webView) {
            return E_INVALIDARG;
        }
    
     
        LPWSTR titlePtr = nullptr;
        HRESULT hr = webView->get_DocumentTitle(&titlePtr);
    
        if (SUCCEEDED(hr) && titlePtr) {
     
            title = titlePtr;
    
     
            CoTaskMemFree(titlePtr);
        }
    
        return hr;

    Code:
    Private Declare Function lstrcpyW Lib "kernel32" (ByRef Buffer As Any, ByVal Bstr_address As Long) As Long
    Private Declare Function lstrlenW Lib "kernel32" (ByVal lpData As Long) As Long
    
    
    Public Function StrFormPtr(lPtr As Long) As String
        Dim Buff() As Byte, Len1 As Long '????Byte??
        Len1 = lstrlenW(lPtr) * 2
        ReDim Buff(0 To Len1 - 1) As Byte '??????,??????Unicode?????2
        lstrcpyW Buff(0), lPtr    '?????Buff?
        StrFormPtr = Buff()
        'lstrcpyW VarPtr(Buff(0)), ByVal lPtr   '?????Buff?
    End Function
    Code:
    Private Declare Function lstrcpyW_Long Lib "kernel32" Alias "lstrcpyW" (ByVal lpString1 As Long, ByVal lpString2 As Long) As Long
    Public Function StrFormPtr2(ByVal lPtr As Long) As String
        StrFormPtr2 = String(lstrlenW(lPtr), " ")
        lstrcpyW_Long StrPtr(StrFormPtr2), lPtr    '?????Buff?
    End Function
    Last edited by xiaoyao; Mar 3rd, 2025 at 11:18 PM.

  17. #417
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,040

    Re: [VB6] Modern Shell Interface Type Library - oleexp.tlb

    i do clear string by lptr,why also can read string from this address?
    maybe need fill memory with 0?

    Code:
     Private Declare Function SysReAllocString Lib "oleaut32.dll" (ByVal pBSTR As Long, Optional ByVal pszStrPtr As Long) As Long
    Private Declare Sub CoTaskMemFree Lib "ole32.dll" (ByVal hMem As Long)
     Function LPWSTRtoStr(lPtr As LongPtr, Optional ByVal fFree As Boolean = True) As String
    SysReAllocString VarPtr(LPWSTRtoStr), lPtr
    If fFree Then
        Call CoTaskMemFree(lPtr)
    End If
    End Function
    Which IDL or ODL files are dedicated to WEBVIEW2? Can it be made into an independent TLB?
    What development environment does compiler need to install? vc++2017? Still VC++6.0, MIDL.EXE?
    Last edited by xiaoyao; Mar 3rd, 2025 at 11:52 PM.

  18. #418
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,040

    Re: [VB6] Modern Shell Interface Type Library - oleexp.tlb

    The function or interface is marked as restricted, or the function uses an automatic type that is not supported in Visual Basic
    maybe error by "BOOL"??

    ICoreWebView2_21.ExecuteScriptWithResult Js, me

    Code:
    Private Sub ICoreWebView2ExecuteScriptWithResultCompletedHandler_Invoke(ByVal errorCode As Long, ByVal result As oleexp.ICoreWebView2ExecuteScriptResult)
    
            ICoreWebView2ExecuteScriptResult (MEMbers:)
            Property Succeeded As BOOL
            Sub TryGetResultAsString(stringResult As LongPtr, Value As BOOL)

    you can add new interface?
    Code:
      interface      ICoreWebView2ExecuteScriptWithResultCompletedHandler_Long
            Private Sub ICoreWebView2ExecuteScriptWithResultCompletedHandler_Long_Invoke(ByVal errorCode As Long, ByVal ICoreWebView2ExecuteScriptResultA AS Long)
    so i can call by vtable:call com by index:ICoreWebView2ExecuteScriptResultA
    Last edited by xiaoyao; Mar 4th, 2025 at 03:10 AM.

  19. #419
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,040

    Re: [VB6] Modern Shell Interface Type Library - oleexp.tlb

    oleview.exe open your oleexp.tlb:
    ICoreWebView2_21 IS FROM ICoreWebView2_20
    ICoreWebView2_20 IS FROM ICoreWebView2_19

    I DON'T KHNOW WHICH CLASS
    There are 20 classes nested layer by layer, with inheritance relationships. I don't know which class, interface, or method has parameter types that are incompatible with VB6. I wonder if there are any tools that can enumerate and detect specific parameter types?


    edit by idl or odl format:
    muse use same uuid? or can use any uuid?

    if we have 10 Handler objects?
    something is 2 argmemuent count? something 3 args,4args?
    we can only use 3 Handler ?

    arg2Handler(byval a as long ,byval b as lon)
    arg3Handler(byval a as long,byval b as long,byval c as long)
    ?
    ICoreWebView2ExecuteScriptWithResultCompletedHandler

    Code:
    [
      odl,
      uuid(1BB5317B-8238-4C67-A7FF-BAF6558F289D)
    ]
    interface ICoreWebView2ExecuteScriptWithResultCompletedHandler : IUnknown {
        HRESULT _stdcall Invoke(
                        [in] HRESULT errorCode, 
                        [in] ICoreWebView2ExecuteScriptResult* result);
    };

    ICoreWebView2ExecuteScriptResult
    Code:
    [
      odl,
      uuid(0CE15963-3698-4DF7-9399-71ED6CDD8C9F)
    ]
    interface ICoreWebView2ExecuteScriptResult : IUnknown {
        [propget]
        HRESULT _stdcall Succeeded([out, retval] BOOL* Value);
        [propget]
        HRESULT _stdcall ResultAsJson([out, retval] LongPtr* jsonResult);
        HRESULT _stdcall TryGetResultAsString(
                        [out] LongPtr* stringResult, 
                        [out] BOOL* Value);
        [propget]
        HRESULT _stdcall Exception([out, retval] ICoreWebView2ScriptException** Exception);
    };
    Code:
    ICoreWebView2ScriptException
    
    [
      odl,
      uuid(0CE15963-3698-4DF7-9399-71ED6CDD8C9F)
    ]
    interface ICoreWebView2ExecuteScriptResult : IUnknown {
        [propget]
        HRESULT _stdcall Succeeded([out, retval] BOOL* Value);
        [propget]
        HRESULT _stdcall ResultAsJson([out, retval] LongPtr* jsonResult);
        HRESULT _stdcall TryGetResultAsString(
                        [out] LongPtr* stringResult, 
                        [out] BOOL* Value);
        [propget]
        HRESULT _stdcall Exception([out, retval] ICoreWebView2ScriptException** Exception);
    };
    Name:  webview2_more_layers.jpg
Views: 315
Size:  17.6 KB
    Last edited by xiaoyao; Mar 4th, 2025 at 01:24 PM.

  20. #420
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,040

    Re: [VB6] Modern Shell Interface Type Library - oleexp.tlb

    Webview2.Navigate strptr("https://www.bing.com") webView->get_DocumentTitle(&titlePtr);
    str=webView.sources
    dim js as.string
    webview.executescript(js,callback)

    Can you convert these parameters and return values directly into ordinary string types on tlb,idl?
    thanks

  21. #421

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    6,819

    Re: [VB6] Modern Shell Interface Type Library - oleexp.tlb

    If it's not in an Implements scenario you'd actually have to call something with an incompatible type to get an error.

    Search for LPWSTRtoStr for how to get a string from a Long.

    I'm not recompiling the tlb with your preferred methods. All the WebView stuff is in exp_webview2.odl in the oleexp source. I don't see any problems with any interface you mentioned and I can't understand what you are saying. Maybe just post a project with a minimal reproduction of the problem.

  22. #422
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,040

    Re: [VB6] Modern Shell Interface Type Library - oleexp.tlb

    CoTaskMemFree(lPtr)
    I will sort out some questions and update them at that time.
    In SQLite, query the data or read the value of each field. Since it is of type UTF8, it is fine to return the integer type directly.
    It also needs to be converted manually with the API.
    In webview2, many data types are directly bstr types, and the return integer type also needs to call the API to convert, and also needs to use the API to release.
    This creates a memory leak and adds a lot of code.

    Data Type Correspondence and Release Issues (from VC++ to VB6)

    - Web source: In VC++, when obtaining the Web source, it may involve data types such as strings. In VB6, the corresponding data type is the String type. Generally, after obtaining the web page source code from the WebView in VB6, if it is no longer needed, there is no need to perform complex memory management manually as in VC++. The garbage collection mechanism of VB6 will clean up the memory occupied by unused strings and other objects at an appropriate time.
    - The url in navigate(url) : In VC++, the url parameter of the navigate method is usually of the string type. In VB6, it also corresponds to the String type. After using the Navigate method of the WebView in VB6 to load a website URL, generally, there is no need to release the url string itself manually. VB6 will manage its memory automatically.

Page 11 of 11 FirstFirst ... 891011

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