Check for a blacknull?

05/25/2011 21:11 iStefan#1
Okay how can I make a check if my own program is passed an argument when it starts.
05/25/2011 21:17 _DreadNought_#2
What you trying to achieve?
05/25/2011 21:50 iStefan#3
Quote:
Originally Posted by _DreadNought_ View Post
What you trying to achieve?
A protection.
05/25/2011 23:59 Korvacs#4
In what sense....

Do you want to check if the program is passed an arguement when it starts?

Or do you want to check if it bypasses auto-patching...?
05/26/2011 07:26 shitboi#5
i'm probably being extra here since the pros are already replying.
But, just so as you know "blacknull" is just an argument passed into Conquer.exe, and is accepted by Conquer.exe as a start up cmd.

So, when you mention blacknulling a program, one would first think of Conquer.exe. That is kind of contradictory to your first post since you are checking if your own program is blacknulled. Doesnt make sense.
05/26/2011 15:57 iStefan#6
Quote:
Originally Posted by Korvacs View Post
In what sense....

Do you want to check if the program is passed an arguement when it starts?

Or do you want to check if it bypasses auto-patching...?
The First one. I want to check if the program is passed an argument when it starts.
05/26/2011 17:14 shitboi#7
Quote:
Originally Posted by iStefan View Post
Okay how can I make a check if my own program is passed an argument when it starts.
if you question is as qouted above.. then you can simply look at your definition for main(), depending on how you handled your arguments.

If you want to find out if an argument is pass into some other programs, I can't offer any help. debugging is the key, lol
05/26/2011 21:22 fm_sparkart#8
Code:
int main( int argc, char** argv )
{
  if ( argc > 1 )
    std::cout << "An argument was passed"\n";
  return 0;
}