• Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About kuny

  • Rank
  • Birthday 06/16/1980
  1. Easy Code - http://www.easycode.cat/English/Help/Masm/EasyCode.htm - It seems to be a kinda visual basic 6 like approach for ASM . And here is some tutorial on that - http://www.easycode.cat/English/Tutorial.htm
  2. flaw , I thought that you learnt the basics of python from codeacademy and hence would find it easy to learn other languages like C and Ruby in detail . This site http:/learncodethehardway.org/ seems to have good reviews and that's why I mentioned its name in this thread. Never thought of trolling you , just thought that it would help someone .
  3. http://learncodethehardway.org/
  4. Sure , I'll try that . Thanks a lot bro !
  5. Oh yes ... I did not notice that .. i have seen this bug quite many times . Thanks for quick response , protocol
  6. Obviously , this is not my code , looks interesting ( found it on msdn ). //--------------------------------------------------------------------------- #pragma hdrstop #include #include #include typedef HRESULT (WINAPI *PWDStatus)(__out BOOL* pfEnabled); //--------------------------------------------------------------------------- #pragma argsused int main(int argc, char* argv[]) { BOOL status; TCHAR szFilename[1024]; ExpandEnvironmentStrings(_T("%ProgramFiles%\\Windows Defender\\MpClient.dll"), szFilename, (sizeof(szFilename) / sizeof(szFilename[0]))); HMODULE hMod = LoadLibrary(szFilename); if (hMod == NULL) { _tprintf(_T("Windows defender is not installed\n")); return 2; } PWDStatus pWDStatus = (PWDStatus) GetProcAddress(hMod, "WDStatus"); if (pWDStatus == NULL) { _tprintf(_T("Windows defender is not installed2\n")); FreeLibrary(hMod); return 3; } HRESULT hr = pWDStatus(&status); if FAILED(hr) { _tprintf(_T("WDStatus failed: hr: 0x%8.8X\n"), hr); FreeLibrary(hMod); return 3; } if (status == FALSE) _tprintf(_T("Windows defender is DISABLED\n")); else _tprintf(_T("Windows defender is ENABLED\n")); FreeLibrary(hMod); return 0; } //--------------------------------------------------------------------------- I made some additions to the original so that it would compile on C++ Builder . I hope somebody finds this useful .
  7. Sorry for troubling you guys again and again ... I got the following snippet from a book on delphi program Types; {$APPTYPE CONSOLE} uses SysUtils; type TOddNumber = (oddFirst = 1, oddSecond = 3, oddThird = 5, oddFourth = 7); var OddNum: TOddNumber; begin OddNum := oddThird; WriteLn(Ord(OddNum)); { 5 } ReadLn; end. The code seems to be correct but DCC gives me an error like this "unit 'Types' recursively uses itself "
  8. I just tried correcting the windows.pas file for the fun of it , but it seems the idea will rather stay as a theory . In spite of me editing it , the compiler gave me the same error . Never mind , I changed to Delphi 2007 and I hope this will be okay there . Thanks everybody ..
  9. No .. Cracksman's 2nd code post also returns the same error .. I will try and use a new version of D7 . Thanks for all the help guys ..
  10. I am using D7 and W7 x86 . Yes , it worked fine when I declared the API
  11. Error goes like this Winp.exe - Entry Point Not Found The procedure entry point DecryptFile could not be located in the dynamic link library kernel32.dll
  12. I had learnt pointers some time back and so I thought of doing a small program on it . Hopefully it helps someone... program ptrs; {$APPTYPE CONSOLE} { Very simple program dealing with ptrs ... It just fills up a character array from A to Z and then uses a pointer to access it one by one and print on screen } uses SysUtils; var alphabets :array[1..26] of char; a : char; i : integer; ptr_alpha : ^char; begin ptr_alpha := addr(alphabets); i := 1; for a:=#65 to #90 do begin alphabets[i] := a; Inc(i); end; while ptr_alpha^ <> #0 do begin Write(ptr_alpha^); Inc(ptr_alpha); end; ReadLn; end.
  13. Thanks cracksman . But when I tried without declaring , it gave me some kind of error . That's why I tried declaring .. Thanks again for clearing it up
  14. I am trying to use DecryptFile from WinAPI . program Winp; {$APPTYPE CONSOLE} uses SysUtils, Windows; function DecryptFile(lpFileName : String; dwReserved : Integer) : Bool; stdcall; external 'advapi32.dll' name 'DecryptFile'; begin DecryptFile('sd.sql',0); end. When I ran this , it gave me an error stating procedure entry point was not found in advapi32.dll. I have some doubts about this 1)Is this the correct way of calling a winapi function ? 2)When I tried with DecryptFileA ( which seems to stand for ANSI ) instead of DecryptFile , it seemed to work . So what is the difference ?
  15. It aint anything big . Its for the first time that I am dealing with win API and I had to read through the MSDN . Its very common but just for new people . program GetDirectory; {$APPTYPE CONSOLE} uses Windows, SysUtils; var pchar_var : pchar; str : array[1..40] of char; begin pchar_var := @str; GetCurrentDirectory(38,pchar_var); writeln(pchar_var); readln; end. Pls feel free to give me some suggestions as I am a complete newbie to API .
  • Who's Online   0 Members, 0 Anonymous, 7 Guests (See full list)

    There are no registered users currently online