Page 1 of 2
msdnLib2PB - Library Importer
Posted: Fri Apr 24, 2015 8:15 pm
by chi
And without any further ado...
Download:
(beta 4) msdnLib2PB.zip (407KB)

Re: msdnLib2PB - Library Importer
Posted: Fri Apr 24, 2015 9:09 pm
by Zebuddi123
Hi chi very nice! very useful thanks for sharing, I have noticed that some api`s data are not processed (I presume your regexing from the downloaded file) ie comctl32lib.lib where api "ImageList_AddIcon" "CreateToolbar" and others etc, On closer inspection it seems that these are already predefined in APIFunctionListing.txt. if that is the case maybe an already defined symbol/icon added to the listview would be nice, just a thought!.
Also a question why the green highlighting ?
Zebuddi.

Re: msdnLib2PB - Library Importer
Posted: Fri Apr 24, 2015 11:07 pm
by chi
Hi, glad you like it.
msdnLib2PB (Update Checked/Selected) only recognizes functions that are actually available on msdn. Since there is no site for "CreateToolbar", there is nothing to extract. "ImageList_AddIcon", on the other hand, is a macro (maybe I'll add macros too, need to investigate first).
Red Highlight = There were more than one paragraphs as for the description (it's possible that the actual description is not starting at the beginning)
Green Highlight = Letters count exceeds more than 150 letters
Double clicking a function will either open the url from the "website" column or search the function on msdn.
Re: msdnLib2PB - Library Importer
Posted: Sun Apr 26, 2015 1:01 am
by Danilo
Awesome work, chi! Many thanks!
1.)
I think you could enhance the search result for many Ansi/WideString funtions:
If no result is found for a function and the last character of the function name is uppercase 'W' or 'A',
then remove the last character and search again.
For example, many functions in unicows.lib can't be found because they end with 'W': CharLowerW, ChooseFontW, etc...
Help pages for CharLower and ChooseFont could be found.
2.)
Callbacks or function pointers (Prototypes in PB) are not parsed correctly, for example:
RatingObtainQuery function.
Code: Select all
void (*fCallback)( DWORD dwUserData, HRESULT hr, LPCTSTR pszRating, LPVOID lpvRatingDetails)
becomes
Maybe you could enhance that.
3.)
Could you allow to load multiple .lib or a whole directory containing .lib files?
That would allow to import whole WindowsSDK .lib directory (300+ .lib), or at least
a few files at a time.
4.)
I think a "Select All" and "Clear Selection" right-click popup-menu or button would be nice, to control the checkboxes.
Re: msdnLib2PB - Library Importer
Posted: Sun Apr 26, 2015 8:56 am
by Bisonte
Wohow !


But I checked the function of this program only after an intensive search....
A little description is needed ....

Re: msdnLib2PB - Library Importer
Posted: Sun Apr 26, 2015 10:19 pm
by chi
beta 2 is ready to test...
@Danilo: Thanks for the bugreport
- 1.) fixed
2.) fixed (with a workaround for APIFunctionListing.txt). Better ideas?
3.) definitely, but a little bit later...
4.) added
I changed a lot more, so please don't use the old .xml's from beta 1
@Bisonte: Will do, but also later
@PB-Devs: It would be very nice if we could have dynamic statusbar fields in the IDE out of the box! So that every "separator" from an APIFunctionListing line gets its own field (+auto adj. width?!). Also a clickable weblink or button generated from an URL could be awesome.
cheers, chi
Re: msdnLib2PB - Library Importer
Posted: Tue Apr 28, 2015 5:24 pm
by chi
beta 3 is ready to test...
Re: msdnLib2PB - Library Importer
Posted: Tue Apr 28, 2015 9:02 pm
by hallodri
Hi chi,
your program imports too many functions. One can understand the "glaux.lib".
You have functions that begin with "__imp_" also filter out.
... There will be some improvements to the speed, perhaps by a online cache or read and compare the APIFunctionListing?
Re: msdnLib2PB - Library Importer
Posted: Wed Apr 29, 2015 1:12 pm
by chi
Hi hallodri,
it seems that glaux.lib is some kind of a special lib. If you open it with 7-zip it differs from any other lib I tested (contains .obj instead of .dll). Since my importer is only looking for "__imp_"-sections right now, it obviously fails on most of the functions. Thanks for pointing that out... Need to rewrite some parts of the Lib-Parser!
Regarding the speed improvements:
There isn't much left to improve ^^. The most time consuming part is searching for the right URL of the function, which, if not found in the first run, triggers up to 3 more search terms (macros, ...). So if the function doesn't exist at all on msdn, it can take ~ 4-5 seconds for nothing

Re: msdnLib2PB - Library Importer
Posted: Fri May 01, 2015 7:36 am
by Danilo
chi wrote:it seems that glaux.lib is some kind of a special lib. If you open it with 7-zip it differs from any other lib I tested (contains .obj instead of .dll). Since my importer is only looking for "__imp_"-sections right now, it obviously fails on most of the functions. Thanks for pointing that out... Need to rewrite some parts of the Lib-Parser!
Usually .lib contain static .obj with the actual code. There is some special kind of .lib files,
that contain no code objects but only import sections for DLLs.
I doubt that function names contained within .obj files can be found at MSDN, most of the time.
chi wrote:Regarding the speed improvements:
There isn't much left to improve ^^. The most time consuming part is searching for the right URL of the function, which, if not found in the first run, triggers up to 3 more search terms (macros, ...). So if the function doesn't exist at all on msdn, it can take ~ 4-5 seconds for nothing

Is it fully threaded search / downloading / scanning of pages?
Should be faster with 8+ threads (Quadcore+ with hyperthreading) & pretty good online connection (like 50MBit+).
Re: msdnLib2PB - Library Importer
Posted: Fri May 01, 2015 8:39 am
by Danilo
BTW, some small Gadget/StatusbarField size problems with 125% DPI display (could be real problems with 200% DPI, for example MS Surface Pro):
The PayPal button at top right is a little bit pale/colourless in my opinion... but I found and used it, anyway.
PayPal message:
I would really like Multi-.Lib-Loading and the DPI issue changed.
Maybe command-line-arguments like msdnLib2PB.exe -in abc.lib -out abc.xml
What about remembering the window size+position and ListIconGadget column widths, in msdnLib2PB.ini?
Re: msdnLib2PB - Library Importer
Posted: Sun May 03, 2015 5:25 pm
by chi
Danilo wrote:The PayPal button at top right is a little bit pale/colourless in my opinion... but I found and used it, anyway.

Oh wow, thank you
very much Danilo! Consider most (if not all) of your requests done

. Beta 4 will be available in the next couple of days...
Re: msdnLib2PB - Library Importer
Posted: Fri May 08, 2015 1:24 pm
by Danilo
chi wrote:Consider most (if not all) of your requests done

. Beta 4 will be available in the next couple of days...
Thanks chi! Did you think about adding drag&drop to the window, so we can drop .lib (and .xml?) onto the window instead
opening with FileRequester?
Re: msdnLib2PB - Library Importer
Posted: Sat May 09, 2015 1:16 pm
by chi
Soon ^^
Sorry for the delay, got a lot of other things to do right now. But beta 4 should be ready tomorrow (with many changes incl. Drag&Drop).
Re: msdnLib2PB - Library Importer
Posted: Fri May 15, 2015 1:57 pm
by Danilo
Looks good, chi! Thanks in advance!