Jump to content
Tuts 4 You
Sign in to follow this  
LCF-AT

Looking for C++ API Reference Help File

Recommended Posts

LCF-AT

Hi guys,

short question.Does anyone know where I can find / download a API reference file for msvcrt (C++) APIs?So at the moment I try to work with strings and find a lot APIs I can use and want to test them out how they work etc but I would also have any reference file for this too like the Win32 Programmers Reference help file where are listet many  APIs I can check quickly.Dont wanna  check every API on internet now to find the descriptions of them etc you know.Maybe you know something  like this I could download and use.

Thank you

Share this post


Link to post
LCF-AT

Hi,

thanks for your answer but I dont want to install any 700 MB etc if I only need any C++ reference.Is there not anything else?Small & tiny like W32 hlp file?

greetz

Share this post


Link to post
Kurapica

I had the old win32 reference in chm format but it is almost obsolete in 2017.

before diving into the C++ APIs, I recommend having a good base to build on later by

understanding the basic concepts, check this website : https://www.tutorialspoint.com/cplusplus/index.htm

 

  • Like 2

Share this post


Link to post
Extreme Coders

For pure C++  reference, you can try. DevDocs & Zeal documentation browser. Both provide offline access.

For Devdocs, all you need is a web browser and the files get installed in your local storage which you can browse offline later.
For zeal, you would need to install their help browser and a portable version is available as well. Later you can install the C++ docset for offline browsing.

https://zealdocs.org/

http://devdocs.io/

  • Like 3

Share this post


Link to post
LCF-AT

Hi again,

thanks for the links Extreme Coders. :) So this was what I am looking for.I downloaded the portable Zeal app and did download the C++ doc.Seems to be a  very cool app to download a lot of references docs.Just great.Why I didnt heard before about this nice tool? :)

So I have some tiny questions about some strings.

- Is there a API I can use like strstr but without case sensitive style?Similar like lstrcmpi just with checking the entire string text you know.Normaly if I search some string in a text I use strstr but its using case sensitive.Also I want  to prevent to change  the text to low char before I search something into etc.

- Also I am looking for a API what can modify the text....

Example: Lets say I have this text..

1 2 3 4 5 6 7 8 A 0
1 2 3 4 5 6 7 8 a 0
1 2 3 4 5 6 7 8 A 0
1 2 3 4 5 6 7 8 a 0

Now I want to search for all A / a text parts and to repleace
them with my text like ABC and then it should look so

1 2 3 4 5 6 7 8 ABC 0
1 2 3 4 5 6 7 8 ABC 0
1 2 3 4 5 6 7 8 ABC 0
1 2 3 4 5 6 7 8 ABC 0

...is there  also any  API what can do this for me?Something like a repleace function in  Notepad.The API should then retrun a new pointer to created / modded text etc.

greetz

  • Like 1

Share this post


Link to post
LCF-AT

Hi Alzri2,

thanks but its not a function I can use.So I only can use API functions.

PS: One question about the Zeal tool and the docs I can download.So I see there are not all listet in the tool like on the homepage.So I wanted also to download the HTTP doc but its not inside the tool.

greetz

Share this post


Link to post
LCF-AT

Hi again,

thanks so far but as I said I was looking for any API what could do the parts but it seems there isnt  any  API I could use and  need to handle it by myself.Also bad that there isnt a strstr API for cmpi style.Also here I only can handle it manually with detours like changing the string & text to upper or lower case etc. :( Its funny to see that there are a lot APIs but not for this. :)

greetz

Share this post


Link to post
fearless

Could use the masm32 library and use the functions in that to search and replace and output to a new buffer.

Typically i would use lowercase or uppercase on the string (if its small) to get round the case sensitivity if required, and if you require it to be non destructive, just make a copy of the buffer/string to perform the lower/upper case change on.

For larger buffers/files then id opt for manually parsing the buffer/file and handling all the search/compare and copying in a loop.

 

  • Like 1

Share this post


Link to post
Techlord
On Thursday, 23 March, 2017 at 2:55 AM, Extreme Coders said:

For pure C++  reference, you can try. DevDocs & Zeal documentation browser. Both provide offline access.

For Devdocs, all you need is a web browser and the files get installed in your local storage which you can browse offline later.
For zeal, you would need to install their help browser and a portable version is available as well. Later you can install the C++ docset for offline browsing.

https://zealdocs.org/

http://devdocs.io/

This is one of the best offline reference tool that I came across. Thank you for sharing @Extreme Coders !

And do share any more such similar content that would be helpful to us when you have time :)

Share this post


Link to post
atom0s
On 3/24/2017 at 8:32 AM, LCF-AT said:

Hi again,

thanks so far but as I said I was looking for any API what could do the parts but it seems there isnt  any  API I could use and  need to handle it by myself.Also bad that there isnt a strstr API for cmpi style.Also here I only can handle it manually with detours like changing the string & text to upper or lower case etc. :( Its funny to see that there are a lot APIs but not for this. :)

greetz

 

The API works fine, you have to use things together and code the in-betweens yourself. Everything people linked in this thread does what you want. I'm not sure what part you think doesn't work or fails to do what you are looking for.

Share this post


Link to post
LCF-AT

Hi,

which API works?Thats why I am asking just about APIs without coding some stuff between.First the strstr API which only supports original exact strings to find something in a text.So I dont wanna upper or lower the text if it has 1000 bytes or more and strcmpi only checks from the pointer.In this case I have to upper or lower the text & my string in any  buffer first to check whether the string is to find in the text or not.I thought there is any API which could do this already but seems there isnt such a API and now I have to handle it manually.

greetz

Share this post


Link to post
atom0s

Again, I recommend you look into std::string then. With newer C++11 / C++14 / C++17 features you can take advantage of the object in a much better manner than just using the lower end API's. 

You can combine std::search with std::string to create your own ignore case searching function, and extend it into replacements as well.

Share this post


Link to post
LCF-AT

Also again,I dont code in C++ and was just looking for any ready dll function to do the steps I was looking for without to code extra stuff by myself you know.Thats all.If there isnt any API then its just ok to say it and all is clear and then I know it and have code a detour to handle it manually.

greetz

Share this post


Link to post
LCF-AT

Hi again,

new question.Is there any API like msvcrt.__getmainargs (I can use for commandline tools) I can use for not commandline tools?I mean lets say I create a edit control and I do enter any Arguments into (-r "test1" -x "test2" -u "test3") and now I would get  them also spiltet back like it does for commandline.Also possible with any API?

greetz

Share this post


Link to post
ragdog

Parsing the commandline

Share this post


Link to post
evlncrn8

CommandLineToArgvW

Share this post


Link to post
LCF-AT

Hi,

ok CommandLineToArgvW sounds good but I why isnt there no ASCII version to use?So I dont use Unicode strings.In this case I need to change my ASCII line to Unicode then using CommandLineToArgvW and then changing all splitet arguments back to ASCII.Ähhhh!Whats this again for a stupid BS?The getmainargs API does retrun all in ASCII too back.

greetz

Share this post


Link to post
LCF-AT

Hi again,

thanks for the links but I was only looking for any quick usable API and thats all.The getmainargs only works with commandlines and CommandLineToArgvW just works with Unicode strings.All in all I have again to write a detour and code something by myself again.So this is really disappointing.

greetz

Share this post


Link to post
atom0s
6 hours ago, LCF-AT said:

Hi again,

thanks for the links but I was only looking for any quick usable API and thats all.The getmainargs only works with commandlines and CommandLineToArgvW just works with Unicode strings.All in all I have again to write a detour and code something by myself again.So this is really disappointing.

greetz

 

It takes 1 API to convert an ANSI string to Unicode, and 1 to convert back. Or you can use std::string and std::wstring to do it with its overload constructor. Not everything in C/C++ is just done for you. If you want stuff like that, I would suggest coding in a language like C# or Vb.NET or start using the vast amount of libraries and headers that are available for C/C++ such as Boost or similar. 

Share this post


Link to post
evlncrn8

and dont forget, at its core windows is unicode based.. not ansi.. and a 'detour' you mean a hook cos thats the terminology or do you mean a stub ?.. and its not that hard.. if you want it ansi.. getcommandlinea and parse it yourself, its the only options 

and the thing about the languages is right, i was an asm purist before and i really changed my mind, esp now as you have to consider multi platform and also x86 and x64 compilations, going all asm for it isnt worth the time, or the effort..

Edited by evlncrn8 (see edit history)

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×
×
  • Create New...