Commit b0886942 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

windowscodecs: Avoid using CONST.

parent 787bc871
......@@ -241,21 +241,21 @@ static HRESULT register_decoders(struct regsvr_decoder const *list)
KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL);
if (res == ERROR_SUCCESS) {
res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ,
(CONST BYTE*)(buf), 78);
(const BYTE*)buf, 78);
RegCloseKey(instance_clsid_key);
}
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
if (list->author) {
res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ,
(CONST BYTE*)(list->author),
(const BYTE*)list->author,
strlen(list->author) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->friendlyname) {
res = RegSetValueExA(clsid_key, friendlyname_valuename, 0, REG_SZ,
(CONST BYTE*)(list->friendlyname),
(const BYTE*)list->friendlyname,
strlen(list->friendlyname) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
......@@ -263,34 +263,34 @@ static HRESULT register_decoders(struct regsvr_decoder const *list)
if (list->vendor) {
StringFromGUID2(list->vendor, buf, 39);
res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ,
(CONST BYTE*)(buf), 78);
(const BYTE*)buf, 78);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->container_format) {
StringFromGUID2(list->container_format, buf, 39);
res = RegSetValueExW(clsid_key, containerformat_valuename, 0, REG_SZ,
(CONST BYTE*)(buf), 78);
(const BYTE*)buf, 78);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->version) {
res = RegSetValueExA(clsid_key, version_valuename, 0, REG_SZ,
(CONST BYTE*)(list->version),
(const BYTE*)list->version,
strlen(list->version) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->mimetypes) {
res = RegSetValueExA(clsid_key, mimetypes_valuename, 0, REG_SZ,
(CONST BYTE*)(list->mimetypes),
(const BYTE*)list->mimetypes,
strlen(list->mimetypes) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->extensions) {
res = RegSetValueExA(clsid_key, extensions_valuename, 0, REG_SZ,
(CONST BYTE*)(list->extensions),
(const BYTE*)list->extensions,
strlen(list->extensions) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
......@@ -331,10 +331,10 @@ static HRESULT register_decoders(struct regsvr_decoder const *list)
KEY_READ | KEY_WRITE, NULL, &pattern_key, NULL);
if (res != ERROR_SUCCESS) break;
res = RegSetValueExA(pattern_key, length_valuename, 0, REG_DWORD,
(CONST BYTE*)(&list->patterns[i].length), 4);
(const BYTE*)&list->patterns[i].length, 4);
if (res == ERROR_SUCCESS)
res = RegSetValueExA(pattern_key, position_valuename, 0, REG_DWORD,
(CONST BYTE*)(&list->patterns[i].position), 4);
(const BYTE*)&list->patterns[i].position, 4);
if (res == ERROR_SUCCESS)
res = RegSetValueExA(pattern_key, pattern_valuename, 0, REG_BINARY,
list->patterns[i].pattern,
......@@ -345,7 +345,7 @@ static HRESULT register_decoders(struct regsvr_decoder const *list)
list->patterns[i].length);
if (res == ERROR_SUCCESS)
res = RegSetValueExA(pattern_key, endofstream_valuename, 0, REG_DWORD,
(CONST BYTE*)&(list->patterns[i].endofstream), 4);
(const BYTE*)&list->patterns[i].endofstream, 4);
RegCloseKey(pattern_key);
}
RegCloseKey(patterns_key);
......@@ -456,21 +456,21 @@ static HRESULT register_encoders(struct regsvr_encoder const *list)
KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL);
if (res == ERROR_SUCCESS) {
res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ,
(CONST BYTE*)(buf), 78);
(const BYTE*)buf, 78);
RegCloseKey(instance_clsid_key);
}
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
if (list->author) {
res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ,
(CONST BYTE*)(list->author),
(const BYTE*)list->author,
strlen(list->author) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->friendlyname) {
res = RegSetValueExA(clsid_key, friendlyname_valuename, 0, REG_SZ,
(CONST BYTE*)(list->friendlyname),
(const BYTE*)list->friendlyname,
strlen(list->friendlyname) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
......@@ -478,34 +478,34 @@ static HRESULT register_encoders(struct regsvr_encoder const *list)
if (list->vendor) {
StringFromGUID2(list->vendor, buf, 39);
res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ,
(CONST BYTE*)(buf), 78);
(const BYTE*)buf, 78);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->container_format) {
StringFromGUID2(list->container_format, buf, 39);
res = RegSetValueExW(clsid_key, containerformat_valuename, 0, REG_SZ,
(CONST BYTE*)(buf), 78);
(const BYTE*)buf, 78);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->version) {
res = RegSetValueExA(clsid_key, version_valuename, 0, REG_SZ,
(CONST BYTE*)(list->version),
(const BYTE*)list->version,
strlen(list->version) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->mimetypes) {
res = RegSetValueExA(clsid_key, mimetypes_valuename, 0, REG_SZ,
(CONST BYTE*)(list->mimetypes),
(const BYTE*)list->mimetypes,
strlen(list->mimetypes) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->extensions) {
res = RegSetValueExA(clsid_key, extensions_valuename, 0, REG_SZ,
(CONST BYTE*)(list->extensions),
(const BYTE*)list->extensions,
strlen(list->extensions) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
......@@ -634,21 +634,21 @@ static HRESULT register_converters(struct regsvr_converter const *list)
KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL);
if (res == ERROR_SUCCESS) {
res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ,
(CONST BYTE*)(buf), 78);
(const BYTE*)buf, 78);
RegCloseKey(instance_clsid_key);
}
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
if (list->author) {
res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ,
(CONST BYTE*)(list->author),
(const BYTE*)list->author,
strlen(list->author) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->friendlyname) {
res = RegSetValueExA(clsid_key, friendlyname_valuename, 0, REG_SZ,
(CONST BYTE*)(list->friendlyname),
(const BYTE*)list->friendlyname,
strlen(list->friendlyname) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
......@@ -656,13 +656,13 @@ static HRESULT register_converters(struct regsvr_converter const *list)
if (list->vendor) {
StringFromGUID2(list->vendor, buf, 39);
res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ,
(CONST BYTE*)(buf), 78);
(const BYTE*)buf, 78);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->version) {
res = RegSetValueExA(clsid_key, version_valuename, 0, REG_SZ,
(CONST BYTE*)(list->version),
(const BYTE*)list->version,
strlen(list->version) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
......@@ -791,21 +791,21 @@ static HRESULT register_metadatareaders(struct regsvr_metadatareader const *list
KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL);
if (res == ERROR_SUCCESS) {
res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ,
(CONST BYTE*)(buf), 78);
(const BYTE*)buf, 78);
RegCloseKey(instance_clsid_key);
}
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
if (list->author) {
res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ,
(CONST BYTE*)(list->author),
(const BYTE*)list->author,
strlen(list->author) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->friendlyname) {
res = RegSetValueExA(clsid_key, friendlyname_valuename, 0, REG_SZ,
(CONST BYTE*)(list->friendlyname),
(const BYTE*)list->friendlyname,
strlen(list->friendlyname) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
......@@ -813,42 +813,42 @@ static HRESULT register_metadatareaders(struct regsvr_metadatareader const *list
if (list->vendor) {
StringFromGUID2(list->vendor, buf, 39);
res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ,
(CONST BYTE*)(buf), 78);
(const BYTE*)buf, 78);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->metadata_format) {
StringFromGUID2(list->metadata_format, buf, 39);
res = RegSetValueExW(clsid_key, metadataformat_valuename, 0, REG_SZ,
(CONST BYTE*)(buf), 78);
(const BYTE*)buf, 78);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->version) {
res = RegSetValueExA(clsid_key, version_valuename, 0, REG_SZ,
(CONST BYTE*)(list->version),
(const BYTE*)list->version,
strlen(list->version) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->specversion) {
res = RegSetValueExA(clsid_key, specversion_valuename, 0, REG_SZ,
(CONST BYTE*)(list->version),
(const BYTE*)list->version,
strlen(list->version) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
res = RegSetValueExA(clsid_key, requiresfullstream_valuename, 0, REG_DWORD,
(CONST BYTE*)(&list->requires_fullstream), 4);
(const BYTE*)&list->requires_fullstream, 4);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
res = RegSetValueExA(clsid_key, supportspadding_valuename, 0, REG_DWORD,
(CONST BYTE*)(&list->supports_padding), 4);
(const BYTE*)&list->supports_padding, 4);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
if (list->requires_fixedsize) {
res = RegSetValueExA(clsid_key, requiresfixedsize_valuename, 0, REG_DWORD,
(CONST BYTE*)(&list->requires_fixedsize), 4);
(const BYTE*)&list->requires_fixedsize, 4);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
......@@ -877,7 +877,7 @@ static HRESULT register_metadatareaders(struct regsvr_metadatareader const *list
KEY_READ | KEY_WRITE, NULL, &pattern_key, NULL);
if (res != ERROR_SUCCESS) break;
res = RegSetValueExA(pattern_key, position_valuename, 0, REG_DWORD,
(CONST BYTE*)(&container->patterns[i].position), 4);
(const BYTE*)&container->patterns[i].position, 4);
if (res == ERROR_SUCCESS)
res = RegSetValueExA(pattern_key, pattern_valuename, 0, REG_BINARY,
container->patterns[i].pattern,
......@@ -888,7 +888,7 @@ static HRESULT register_metadatareaders(struct regsvr_metadatareader const *list
container->patterns[i].length);
if (res == ERROR_SUCCESS && container->patterns[i].data_offset)
res = RegSetValueExA(pattern_key, dataoffset_valuename, 0, REG_DWORD,
(CONST BYTE*)&(container->patterns[i].data_offset), 4);
(const BYTE*)&container->patterns[i].data_offset, 4);
RegCloseKey(pattern_key);
}
......@@ -1001,21 +1001,21 @@ static HRESULT register_pixelformats(struct regsvr_pixelformat const *list)
KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL);
if (res == ERROR_SUCCESS) {
res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ,
(CONST BYTE*)(buf), 78);
(const BYTE*)buf, 78);
RegCloseKey(instance_clsid_key);
}
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
if (list->author) {
res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ,
(CONST BYTE*)(list->author),
(const BYTE*)list->author,
strlen(list->author) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->friendlyname) {
res = RegSetValueExA(clsid_key, friendlyname_valuename, 0, REG_SZ,
(CONST BYTE*)(list->friendlyname),
(const BYTE*)list->friendlyname,
strlen(list->friendlyname) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
......@@ -1023,31 +1023,31 @@ static HRESULT register_pixelformats(struct regsvr_pixelformat const *list)
if (list->vendor) {
StringFromGUID2(list->vendor, buf, 39);
res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ,
(CONST BYTE*)(buf), 78);
(const BYTE*)buf, 78);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->version) {
res = RegSetValueExA(clsid_key, version_valuename, 0, REG_SZ,
(CONST BYTE*)(list->version),
(const BYTE*)list->version,
strlen(list->version) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
res = RegSetValueExA(clsid_key, bitsperpixel_valuename, 0, REG_DWORD,
(CONST BYTE*)(&list->bitsperpixel), 4);
(const BYTE*)&list->bitsperpixel, 4);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
res = RegSetValueExA(clsid_key, channelcount_valuename, 0, REG_DWORD,
(CONST BYTE*)(&list->channelcount), 4);
(const BYTE*)&list->channelcount, 4);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
res = RegSetValueExA(clsid_key, numericrepresentation_valuename, 0, REG_DWORD,
(CONST BYTE*)(&list->numericrepresentation), 4);
(const BYTE*)&list->numericrepresentation, 4);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
res = RegSetValueExA(clsid_key, supportstransparency_valuename, 0, REG_DWORD,
(CONST BYTE*)(&list->supportsalpha), 4);
(const BYTE*)&list->supportsalpha, 4);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
if (list->channelmasks) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment