Search:

Type: Posts; User: AngelV

Page 1 of 6 1 2 3 4

Search: Search took 0.05 seconds.

  1. Re: Error &H8002802B on ITypeInfo::GetDocumentation vtable call

    WOW Brilliant!! That solved the problem :)

    To be honest, It would have never occurred to me to declare the MEMBERID_NIL const as long !!!

    I already knew that DispCallFunc is very unforgiving...
  2. Re: Error &H8002802B on ITypeInfo::GetDocumentation vtable call

    Indeed fafalone. I use x64 but I also use x32.

    BTW, the GetDocumentation vtable call fails with the same -2147319765 error in both x64 and x32 so I suspect the error is not related to the calling...
  3. Re: Error &H8002802B on ITypeInfo::GetDocumentation vtable call

    I had seen that post but I can't use oleexp .
    Thanks.
  4. Re: Error &H8002802B on ITypeInfo::GetDocumentation vtable call

    I dopn't think so. VTable_Ordinal is 12


    PTR_LEN = 4&

    *QueryInterface Offset = 0 * PTR_lEN = 0
    *AddRef Offset = 1 * PTR_lEN = 4
    *Release ...
  5. Error &H8002802B on ITypeInfo::GetDocumentation vtable call

    I am trying to extract all classes CLSID and corresponding interface names given a COM DLL.

    I found this C++ code snippet which I am trying to translate into vb6/vba but the code erors out when I...
  6. Replies
    42
    Views
    1,570

    Re: MessageBoxIndirect buttons Language

    Thanks. I will do that. If I have any difficulties, I will ask in the forum.

    Thanks for your help.
  7. Replies
    42
    Views
    1,570

    Re: MessageBoxIndirect buttons Language

    @fafalone

    After some further testing, Ii seems that the reason for your code crashing in vbax64 is because I have two versions of excel installed in my computer (both x32 and x64)

    I don't know...
  8. Replies
    42
    Views
    1,570

    Re: MessageBoxIndirect buttons Language

    Yes, MessageBoxTimeout works and MessageBoxEx works too. However, MessageBoxIndirect doesn't work and ignores the dwLanguageId
  9. Replies
    42
    Views
    1,570

    Re: MessageBoxIndirect buttons Language

    I just downloaded and installed rohitab apimonitor but I don't know how I would use it to monitor what happens in the background and watch all the calls made when let's say I call a simple MsgBox....
  10. Replies
    42
    Views
    1,570

    Re: MessageBoxIndirect buttons Language

    Dim lRet As Long
    lRet = SoftModalMessageBox(md)
    Debug.Print lRet '<<=== output works fine
    MsgBox lRet '<<== Error 5 invalid procedure call or argument

    After making the change you suggested,...
  11. Replies
    42
    Views
    1,570

    Re: MessageBoxIndirect buttons Language

    Just to confirm the issue. I just copied and pasted your full module code (from post#29) in my vba project. I changed nothing. the code compiles well. and then when ran, it displays the...
  12. Replies
    42
    Views
    1,570

    Re: MessageBoxIndirect buttons Language

    Well. it could be because I am using an older version (xl 2016 x64). Who knows.


    It may well be, but dwLanguageId is completely ignored in MessageBoxIndirect ! I am yet to see a working example.
  13. Replies
    42
    Views
    1,570

    Re: MessageBoxIndirect buttons Language

    Although your code uses PtrSafe and LongPtr, it may still be running x32bit. Are you sure your vba host is not a x32bit application ?

    PS: Please, try replacing LongPtr with LongLong to confirm.
  14. Replies
    42
    Views
    1,570

    Re: MessageBoxIndirect buttons Language

    @fafalone,



    Your last code displays the messagebox but you can't show the result in a msgbox . In fact, you can't display any other msgbox after the function returning.

    It doesn't crash if...
  15. Replies
    42
    Views
    1,570

    Re: MessageBoxIndirect buttons Language

    Franky, I can't believe it !! I didn't know that the MessageBoxEx(A/W) API worked for showing multilingual button captions! for some reason, I was under the impression that it didn't work just like...
  16. Replies
    42
    Views
    1,570

    Re: MessageBoxIndirect buttons Language

    @fafalone

    I seem to have managed to make the undocumented SoftModalMessageBox api look and behave just like standard vb/vba msgbox but with the added bonus of being able to choose the language...
  17. Replies
    42
    Views
    1,570

    Re: MessageBoxIndirect buttons Language

    I have managed to make this undocumented SoftModalMessageBox func work but it is useless for what I am after here because the vbMsgBoxStyles have no effect except for icons.

    This undocumented...
  18. Replies
    42
    Views
    1,570

    Re: MessageBoxIndirect buttons Language

    @fafalone

    Have you made any progress with this? Thanks.
  19. Replies
    42
    Views
    1,570

    Re: MessageBoxIndirect buttons Language

    This is what I am using:


    Private Declare PtrSafe Function MessageBoxIndirect Lib "user32" Alias "MessageBoxIndirectW" (lpMsgBoxParams As MSGBOXPARAMSW) As Long

    Private Type MSGBOXPARAMSW
    ...
  20. Replies
    42
    Views
    1,570

    Re: MessageBoxIndirect buttons Language

    No. I didn't compile or tested the C code in the article. All I see is that it is wrapper for the user32 MessageBoxIndirect and the article explains how to set the dwLanguageId which implies (at...
  21. Replies
    42
    Views
    1,570

    Re: MessageBoxIndirect buttons Language

    I have 4 languages installed. English being the current default system language.

    When I change the default language (say from English to Spanish) via Control Panel, the MessageboxIndirect func...
  22. Replies
    42
    Views
    1,570

    Re: MessageBoxIndirect buttons Language

    Agree. It is just that such an important step (otherwise the icons won't show up) is not documented anywhere ! I find this weird.

    Had I not seen a MessegaBoxIndirect example posted in this forum...
  23. Replies
    42
    Views
    1,570

    Re: MessageBoxIndirect buttons Language

    UP

    As I mentioned in post#5, I am Still trying to understand why I need to AND the dwStyle with (Not (&H70&)).

    What's all about this misterious flag? I can't find it anywhere in the...
  24. Replies
    42
    Views
    1,570

    Re: MessageBoxIndirect buttons Language

    Online and via code :

    EnumSystemLocales(AddressOf EnumSystemLocalesProc, LCID_INSTALLED)
  25. Replies
    42
    Views
    1,570

    Re: MessageBoxIndirect buttons Language

    One more question:


    MB.dwStyle = (Buttons + MB_USERICON) And Not (&H70&)

    If we omit the And Not (&H70&), the messagebox icons don't show up.

    Where does that magic flag come from? I couldn't...
  26. Replies
    42
    Views
    1,570

    Re: MessageBoxIndirect buttons Language

    Shame. I saw this C# project in the codeproject website and the developper sounds confident the language ID can be set.
  27. Replies
    42
    Views
    1,570

    MessageBoxIndirect buttons Language

    I want to set the language of the messagebox buttons via the dwLanguageId member of the MSGBOXPARAMS but it is not working.

    I have tested with Spanish, Arabic and French which are all installed in...
  28. Re: ByVal when calling API functions VS ByVal when calling VB functions.

    Thanks fafalone for the explanation.
  29. ByVal when calling API functions VS ByVal when calling VB functions.

    Hi all,


    Function SomeFunc(x As Long) As Long
    SomeFunc = x
    End Function

    Sub Caller()
    MsgBox SomeFunc(2&) '<== Works ok
    End Sub
  30. Replies
    11
    Views
    523

    Re: SafeArrayCopy with string arrays ?

    @Dry Bone

    BTW,


    If (typ And &H4000) = 0 Then ArrayPtr = VarPtr(arr): Exit Function
    The ArrayPtr function won't work if the array is passed ByVal
  31. Replies
    11
    Views
    523

    Re: SafeArrayCopy with string arrays ?

    Sorry for the confusion. I used ArrPtr from msvbvm60.dll just because I am posting the question in the vb6 forum and to make it easy for you guys to test the code snippet. In reality, I use the...
  32. Replies
    11
    Views
    523

    Re: SafeArrayCopy with string arrays ?

    Thank you guys for your help.

    @Dry Bone
    I tweaked your alternative ArrayPtr custom function using CopyMemory as I am applying this to vba where there is no msvbvm60. Your solution worked.
    ...
  33. Replies
    11
    Views
    523

    Re: SafeArrayCopy with string arrays ?

    Yes, I know I could do that but, I am exploring SafeArrays and related ole functions. I am trying to learn how arrays work at lower level.

    Thanks.
  34. Replies
    11
    Views
    523

    SafeArrayCopy with string arrays ?

    Declare Function ArrPtr Lib "msvbvm60.dll" Alias "VarPtr" (var () As Any) As Long
    Declare Function SafeArrayCopy Lib "oleaut32" (ByVal psa As Long, ByVal ppsaOut As Any) As Long
    Declare Sub...
  35. Replies
    1
    Views
    308

    Querying interfaces

    As we can see from the above MSForms library docs, the UserForm CoClass implements two interfaces: The _UserForm (default interface) and the FormEvents (default events interface)

    Below, I am...
  36. Thread: Directory Date

    by AngelV
    Replies
    21
    Views
    1,709

    Re: Directory Date

    Thanks fafalone. I have learnt so much from your work on interfaces.
  37. Thread: Directory Date

    by AngelV
    Replies
    21
    Views
    1,709

    Re: Directory Date

    @fafalone

    Thanks.

    I was actually displaying the text in the debug window and on a standard MsgBox which are ansi.

    Why would PSFormatPropertyValue return a string with such invisible...
  38. Thread: Directory Date

    by AngelV
    Replies
    21
    Views
    1,709

    Re: Directory Date

    Hi fafalone,

    Been using this but i get extra 0x3f character (? question mark character) when passing System.DateCreated as mPKEY
    ?20/?02/?2024 ??10:45

    BTW, the vbforums site is very slow today...
  39. Thread: Directory Date

    by AngelV
    Replies
    21
    Views
    1,709

    Re: Directory Date

    duplicate
  40. Thread: Directory Date

    by AngelV
    Replies
    21
    Views
    1,709

    Re: Directory Date

    Duplicate - forum site slow
Results 1 to 40 of 239
Page 1 of 6 1 2 3 4



Click Here to Expand Forum to Full Width