+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Member mrpervie's Avatar
    Join Date
    May 2009
    Location
    corn field
    Posts
    45

    Angry [DCC Error] Option.pas(84): E2010 Incompatible types: 'Char' and 'AnsiChar'

    im trying to compile Agent-Hs32-Idir[V-P] Rat Open source (the server i got the client working)
    but i run into this error :

    [DCC Error] Option.pas(84): E2010 Incompatible types: 'Char' and 'AnsiChar'

    and it brings me to this line:

    cHandle := FindFirstFileA(PChar(FileName), FindData); Result:= cHandle <> INVALID_HANDLE_VALUE; IF Result THEN begin FindClose(cHandle); end; end;

    i did some research and was reading that You must replace all PChar with PAnsIChar. PChar is a PWideChar in
    Delphi 2009 cuz 'Char' and 'PChar' are now 'WideChar' and 'PWideChar' in
    D2009. You cannot assign an AnsiChar/PAnsiChar to a WideChar/PWideChar,
    and vice versa, without extra coding....but ..its alsways somthing simple and i usually make shit complicated....lol can somone help me out or give me some ideas as to why im getting this error?:confused:

  2. #2
    Senior Member zorgion's Avatar
    Join Date
    May 2009
    Location
    Hueco Mundo
    Posts
    627
    MSDN:
    Requirements:

    Minimum supported client Windows 2000 Professional
    Minimum supported server Windows 2000 Server
    Header WinBase.h (include Windows.h)
    Library Kernel32.lib
    DLL Kernel32.dll
    Unicode and ANSI names FindNextFileW (Unicode) and FindNextFileA (ANSI)
    http://home.no/zorgion/bsod.jpg

  3. #3
    Member mrpervie's Avatar
    Join Date
    May 2009
    Location
    corn field
    Posts
    45
    hm...ok that gives me an idea....

  4. #4
    Member mrpervie's Avatar
    Join Date
    May 2009
    Location
    corn field
    Posts
    45
    oh man....im in over my head here LOL!!! i ben at this for hours reading and reading....lol...gotta admit its kinda fun tho..i didnt realize i could be so dedicated lol.....

  5. #5
    Senior Member zorgion's Avatar
    Join Date
    May 2009
    Location
    Hueco Mundo
    Posts
    627
    Maybe the way your trying to solve this is wrong. When I get stuck, I usually search the MSDN (surely there must be an online SDK for delphi too) to see if I've missed something or turn back to the books catching up with stuff I've forgotten. (e-books)
    http://home.no/zorgion/bsod.jpg

  6. #6
    Member mrpervie's Avatar
    Join Date
    May 2009
    Location
    corn field
    Posts
    45
    oook now im stuck on differant part.....heres a pic of my screen ... the error is


    [DCC Error] HsIdirServer.dpr(21: E2010 Incompatible types: 'Array' and 'PAnsiChar'
    Attached Thumbnails Attached Thumbnails [DCC Error] Option.pas(84): E2010 Incompatible types: 'Char' and 'AnsiChar'-error.jpg  

  7. #7
    Member mrpervie's Avatar
    Join Date
    May 2009
    Location
    corn field
    Posts
    45
    ohh wait..i see he didnt finish the code further up i think....hmm...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [C++] Save variable into a Char
    By criminalz in forum General Programming Help
    Replies: 5
    Last Post: 17-10-2008, 17:28
  2. CSocketMaster & Vista incompatible
    By r-eturner in forum Visual Basic Help
    Replies: 6
    Last Post: 15-10-2008, 23:14
  3. xor / rc4 option help.
    By darkc0de in forum Visual Basic Help
    Replies: 6
    Last Post: 01-10-2008, 23:38
  4. How to have a listview with files icons and types ...
    By DXsTuK in forum General Programming Help
    Replies: 8
    Last Post: 27-06-2008, 00:55
  5. How Do You Get The Length Of Types?
    By The Rogue in forum Delphi Help
    Replies: 3
    Last Post: 26-06-2008, 17:01

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.