Menu

#1 Preserve Case for #visible

Next_Release
open
None
5
2014-08-15
2007-06-26
Patrick
No

Subject: InvisibleBasic ver 3

I have two declarations I added to visible_names.txt

SHGetPathFromIDListA
SHBrowseForFolderA

The case is important, IB reduces them to lowercase
Can we let names in visible_names.txt pass through with case unchanged too?

I tried adding #visible on to the original line

Declare Function SHGetPathFromIDListA Lib "shell32.dll" ( _
ByVal pidl As Long, _
ByVal pszBuffer As String) As Long '#visible

but it still reduced it to lowercase:

Declare Function shgetpathfromidlista Lib "shell32.dll" ( _
ByVal pidl As Long, _
ByVal pszbuffer As String) As Long

Also, on initial trials I found it would stop at the saving the decoder file and give an Excel GPF.
There was an 'Automation error' msgbox behind that.

I found that making recompiling IB and saving the addin made it work.

Discussion

  • John Gunther

    John Gunther - 2007-08-12

    Logged In: YES
    user_id=1385720
    Originator: NO

    Dear Patrick,

    Sorry it took me so long to respond. Thank-you very much for reporting these problems, and for your generous donation--I really appreciate it.

    Though I have not had time to test this patch, I'm pretty sure it will fix your problem and it only involves changing one line of code in the program:

    Change the VBA code line that reads (this line only occurs in one place, in Invisible Basic's var_name function):

    result = LCase(plaintextVarname)

    So that it instead reads:

    result = plaintextVarname

    For the record, I consider this a bug. This unneeded case change normally causes no problems (because VBA ids are case insensitive) EXCEPT for the declaration statement that your example illustrates, where, because case matters in C DLLs, identifier case changes
    like this will break the program.

    Could you report back to this forum if this actually patches your problem (or not) so that other user's can exploit this workaround if they encounter the same issue?

    I will correct this problem in the next release. However, I'm pretty focused on other work right now, and I cannot say exactly when that release will be, so you will have to make do with the patch (assuming it works as expected) until then.

    Regarding the automation error you fixed with a recompile, I looked at that section of the code but could not find any plausible explanation. I suspect some obscure library incompatibility between the version of Excel (Excel 97) that the xla was built with,
    and the version of Excel you are using--and that would explain why a recompile fixed it, because the new XLA you created would then be compatible with your version.

    Thanks for reporting the workaround you found for this problem (namely, to just recompile the application).

    Could you report the version of Excel you were using when it first GP Faulted in this way?

    Thanks for using Invisible Basic,

    John Gunther

     
  • John Gunther

    John Gunther - 2007-08-12
    • labels: 795436 -->
    • milestone: 547827 -->
     
  • John Gunther

    John Gunther - 2007-08-12
    • milestone: --> Next_Release
    • assigned_to: nobody --> johngunther
     

Log in to post a comment.