Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QM translation of C++
#2
1. Yes, offset 1 from byMode. Without it would be offset 2. The C header file contains this:
#pragma pack 1

Or can be this, it works like C #pragma pack 1:
type ____BE_CONFIG11 dwSampleRate !byMode @wBitrate bPrivate bCRC bCopyright bOriginal [pack1]

2. In QM, nonstandard member offsets must be explicitly specified. Including union members. Like in C#. In C/C++ for it are used keyword union and directive #pragma pack.

More info in QM help topic "Type member alignment; unions".

3. Code "type TYPE = #" in a ref file means "there is no conversion of TYPE to QM; in QM use int instead of TYPE". Here # is int type character.

BE_ERR is unsigned long. QM does not have unsigned int.

HBE_STREAM is void*. Here void* is used to define a handle. In QM could be used byte*, but easier is to use int for handles. Like we use int for window handles, although in C it is a pointer typedef.


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)