Exemplo n.º 1
0
HPROFILE create_profile( struct profile *profile )
{
    HPROFILE handle;

    EnterCriticalSection( &MSCMS_handle_cs );

    if ((handle = alloc_profile_handle()))
    {
        DWORD_PTR index = (DWORD_PTR)handle - 1;
        memcpy( &profiletable[index], profile, sizeof(struct profile) );
    }
    LeaveCriticalSection( &MSCMS_handle_cs );
    return handle;
}
Exemplo n.º 2
0
HPROFILE create_profile( struct profile *profile )
{
    HPROFILE handle;

    EnterCriticalSection( &mscms_handle_cs );

    if ((handle = alloc_profile_handle()))
    {
        DWORD_PTR index = (DWORD_PTR)handle - 1;
        profiletable[index] = *profile;
    }
    LeaveCriticalSection( &mscms_handle_cs );
    return handle;
}