Author Topic: reverse engineering difficulties  (Read 585 times)


  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
reverse engineering difficulties
« on: July 25, 2006, 07:47:36 am »

I'm currently trying to reverse engineer our existing code using EA. After setting lots of preprocessor macros, EA cannot parse the following lines:

CUnknown * WINAPI AVMonFilter::CreateInstance(LPUNKNOWN pUnk, HRESULT *phr)

I have tried replacing WINAPI with __stdcall to no avail (LPUNKNOWN and HRESULT are already set as preprocessor macros).

Another un-parsable line is:

HRESULT CAVMonFile::LoadCustomProfile( LPCTSTR ptszProfileFileName, IWMProfile ** ppIWMProfile, BOOL& bEmptyVidRect )

Is this a COM issue? (LPCTSTR, BOOL and HRESULT are set as preprocessor macros)

The final problem is the use of the __int64 type being passed as an argument to a macro in this line:

REGENTRY_CONV_NUMERIC_STORAGETYPE(__int64, 28, %I64d, _ttoi64(lpszStr), (__int64)dwDWORD)

EA reports: Unexpected symbol: __int64

I've tried looking around for some detailed documentation on the reverese engineering process, but the help files seem a little sparse.

Can anyone shed light on what's going on? Does anyone know if there is some more detailed information on reverse engineering?

Thanks in advance,

- Dave

Simon M

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 6248
  • Karma: +51/-5
    • View Profile
Re:  reverse engineering difficulties
« Reply #1 on: July 25, 2006, 03:13:30 pm »
What's going on is that EA totally ignores anything that is defined as a macro.  In the first two examples, having HRESULT and BOOL defined will cause EA to fail to parse.  The reason for this is that EA sees a pointer or reference without a type.

In contrast to that, you will need to define a macro 'REGENTRY_CONV_NUMERIC_STORAGETYPE()' (everything inside the quotes including the brackets) to get get the last line to parse.

What have you read in the help file? talks about preprocessor macros. is the general reverse engineering help.