예제 #1
0
파일: handle.c 프로젝트: RareHare/reactos
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;
}
예제 #2
0
파일: handle.c 프로젝트: hoangduit/reactos
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;
}