Deleting resouce problem
-
hi, i want to delete the resouce in such a way: UpdateResource( m_hModule, "MY_RES_TYPE", MAKEINTRESOURCE( IDR_MY_RES1 ), MAKELANGID( LANG_NEUTRAL, SUBLANG_NEUTRAL ) , NULL, 0 ); MSDN: If lpData is NULL, the specified resource is deleted from the executable file. GetLastError ===87 — The parameter is incorrect. How can i handle this??? If i do this: UpdateResource( m_hModule, "MY_RES_TYPE", MAKEINTRESOURCE( IDR_MY_RES1 ), MAKELANGID( LANG_NEUTRAL, SUBLANG_NEUTRAL ) , lpData, 1 ); UpdateResource( m_hModule, "MY_RES_TYPE", MAKEINTRESOURCE( IDR_MY_RES1 ), MAKELANGID( LANG_NEUTRAL, SUBLANG_NEUTRAL ) , NULL, 0 ); everything's going OK but resouce isn't deleted.
-
hi, i want to delete the resouce in such a way: UpdateResource( m_hModule, "MY_RES_TYPE", MAKEINTRESOURCE( IDR_MY_RES1 ), MAKELANGID( LANG_NEUTRAL, SUBLANG_NEUTRAL ) , NULL, 0 ); MSDN: If lpData is NULL, the specified resource is deleted from the executable file. GetLastError ===87 — The parameter is incorrect. How can i handle this??? If i do this: UpdateResource( m_hModule, "MY_RES_TYPE", MAKEINTRESOURCE( IDR_MY_RES1 ), MAKELANGID( LANG_NEUTRAL, SUBLANG_NEUTRAL ) , lpData, 1 ); UpdateResource( m_hModule, "MY_RES_TYPE", MAKEINTRESOURCE( IDR_MY_RES1 ), MAKELANGID( LANG_NEUTRAL, SUBLANG_NEUTRAL ) , NULL, 0 ); everything's going OK but resouce isn't deleted.
Are you sure that the resource exists? Did you call
EndUpdateResource()
?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
-
hi, i want to delete the resouce in such a way: UpdateResource( m_hModule, "MY_RES_TYPE", MAKEINTRESOURCE( IDR_MY_RES1 ), MAKELANGID( LANG_NEUTRAL, SUBLANG_NEUTRAL ) , NULL, 0 ); MSDN: If lpData is NULL, the specified resource is deleted from the executable file. GetLastError ===87 — The parameter is incorrect. How can i handle this??? If i do this: UpdateResource( m_hModule, "MY_RES_TYPE", MAKEINTRESOURCE( IDR_MY_RES1 ), MAKELANGID( LANG_NEUTRAL, SUBLANG_NEUTRAL ) , lpData, 1 ); UpdateResource( m_hModule, "MY_RES_TYPE", MAKEINTRESOURCE( IDR_MY_RES1 ), MAKELANGID( LANG_NEUTRAL, SUBLANG_NEUTRAL ) , NULL, 0 ); everything's going OK but resouce isn't deleted.