hb-uniscribe.cc: Re-enable build under Visual Studio

-Declare hinstLib at the top of block
-Fix the definitions of the typedefs of ScriptItemizeOpenType,
 ScriptShapeOpenType and ScriptPlaceOpenType
This commit is contained in:
Chun-wei Fan 2013-06-03 17:49:37 +08:00 committed by Behdad Esfahbod
parent 280e52ae95
commit 93a04b8b5e
1 changed files with 5 additions and 4 deletions

View File

@ -44,7 +44,7 @@
#endif
typedef HRESULT WINAPI (*SIOT) /*ScriptItemizeOpenType*/(
typedef HRESULT (WINAPI *SIOT) /*ScriptItemizeOpenType*/(
const WCHAR *pwcInChars,
int cInChars,
int cMaxItems,
@ -55,7 +55,7 @@ typedef HRESULT WINAPI (*SIOT) /*ScriptItemizeOpenType*/(
int *pcItems
);
typedef HRESULT WINAPI (*SSOT) /*ScriptShapeOpenType*/(
typedef HRESULT (WINAPI *SSOT) /*ScriptShapeOpenType*/(
HDC hdc,
SCRIPT_CACHE *psc,
SCRIPT_ANALYSIS *psa,
@ -74,7 +74,7 @@ typedef HRESULT WINAPI (*SSOT) /*ScriptShapeOpenType*/(
int *pcGlyphs
);
typedef HRESULT WINAPI (*SPOT) /*ScriptPlaceOpenType*/(
typedef HRESULT (WINAPI *SPOT) /*ScriptPlaceOpenType*/(
HDC hdc,
SCRIPT_CACHE *psc,
SCRIPT_ANALYSIS *psa,
@ -196,11 +196,12 @@ struct hb_uniscribe_shaper_funcs_t {
inline void init (void)
{
HMODULE hinstLib;
this->ScriptItemizeOpenType = NULL;
this->ScriptShapeOpenType = NULL;
this->ScriptPlaceOpenType = NULL;
HMODULE hinstLib = GetModuleHandle("usp10.dll");
hinstLib = GetModuleHandle("usp10.dll");
if (hinstLib)
{
this->ScriptItemizeOpenType = (SIOT) GetProcAddress (hinstLib, "ScriptItemizeOpenType");