Say I have this code:

BOOL
WINAPI
ActivateActCtx(
    HANDLE hActCtx,
    ULONG_PTR *lpCookie
    );
DWORD
WINAPI
EnumerateLocalComputerNamesA(
     COMPUTER_NAME_TYPE NameType,
     ULONG ulFlags,
     LPSTR lpDnsFQHostname,
     LPDWORD nSize
    );

And I need a C++ script to automatically turn thousands of those into something like this:

BOOL
WINAPI
ActivateActCtx(
    HANDLE hActCtx,
    ULONG_PTR *lpCookie
    )
{
    return PActivateActCtx(
    hActCtx,
    lpCookie
    );
DWORD
WINAPI
EnumerateLocalComputerNamesA(
     COMPUTER_NAME_TYPE NameType,
     ULONG ulFlags,
     LPSTR lpDnsFQHostname,
     LPDWORD nSize
    )
{
     return GEnumerateLocalComputerNamesA( 
     NameType,
     ulFlags,
     lpDnsFQHostname,
     nSize
     );
}

Thanks you so much for your help!

-motherboardlove

We won't write the code for you. We will help you if you show us effort. Sorry, but it's the rules.

I have made some effort - I can post the code if neccessary. Where's a good place to post since the code is a bit long. The problem with my code is it won't read the first 2 letters of the function name somehow.

And note: this is NOT a school assignment (I'm not even school age). I thought that rule was for school assignments only.

Well post the code. We can't help without it!
Well people lie about things not being school assignments ;)
Anyway, I wouldn't help someone who didn't show effort regardless.

As I said, the code is long. I don't want to get banned for "spamming" or something like that. It'll probably take a few pages on your screen.

You won't. How many lines is it? If it's more than about 350 then you would want to upload and attach it. Definitely attach if it's in more than two or three files. If not, then consider splitting it into more files so you don't end up with one long piece of code.

Uploaded the attachement.

code.txt

I realized I was doing something completely useless and cut about 200 lines. XD

LOL that's not long! You only need to upload it if it's like, oh I don't know, let's say...200+ lines. Generally people won't read a longer code like that.
I need you to upload "functions.txt" 'cos your code uses that and I have no idea what it looks like/does.

Functions.txt is the long one. Its not part of the code - its the input function. That one is over 5200 lines, and thats the one I was talking about. Would an attachment be ok for this?

Well functions.txt is basically the same thing as what is in my original post. It just has a lot more functions, but that shouldn't matter - they're all the same format.

No please upload it. We really need to see it! Just think: we could fix any errors in that file, help you shorten it, help you improve your knowledge etc. :)

Ok, I found the problem.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.