msvcrt: Partially implement type_info::name_internal_method()

Alexandre Julliard julliard at winehq.org
Thu Feb 3 05:53:58 CST 2011


Nikolay Sivov <nsivov at codeweavers.com> writes:

> @@ -260,3 +307,24 @@ int CDECL _atoflt( _CRT_FLOAT *value, char *str )
>  {
>      return _atoflt_l( value, str, NULL );
>  }
> +
> +/*********************************************************************
> + * ?_name_internal_method at type_info@@QBEPBDPAU__type_info_node@@@Z (MSVCR90.@)
> + */
> +DEFINE_THISCALL_WRAPPER(MSVCRT_type_info_name_internal_method,8)
> +const char * __thiscall MSVCRT_type_info_name_internal_method(type_info * _this, struct __type_info_node *node)
> +{
> +    /* this is a forward to type_info::name() */
> +#ifdef __i386__
> +    static const char *typeinfo_name = "?name at type_info@@QBEPBDXZ";
> +    void* (WINAPI *p)(void*);
> +#else
> +    static const char typeinfo_name[] = "?name at type_info@@QEBAPEBDXZ";
> +    void* (__cdecl *p)(void*);
> +#endif
> +    static int once;
> +
> +    if (node && !once++) FIXME("type_info_node parameter ignored\n");
> +    p = (void*)GetProcAddress(GetModuleHandleA("msvcrt.dll"), typeinfo_name);
> +    return call_func1(p, _this);
> +}

I think it would be better to duplicate the implementation after
all. Sorry for misleading you with the GetProcAddress suggestion,
I hadn't realized that it would require the thiscall mess.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list