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

Edited 5 Years Ago by motherboardlove: n/a

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.

Edited 5 Years Ago by motherboardlove: n/a

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.

Edited 5 Years Ago by SgtMe: n/a

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

Edited 5 Years Ago by motherboardlove: n/a

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.

Edited 5 Years Ago by SgtMe: n/a

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. :)

This question has already been answered. Start a new discussion instead.