Пример #1
0
func (self *ResourceUpdate) Update(resourceType ResourceType, resourceId ResourceId, language Language, data []byte) error {
	err := wrappers.UpdateResource(
		self.handle,
		uintptr(resourceType),
		uintptr(resourceId),
		uint16(language),
		&data[0],
		uint32(len(data)))
	if err != nil {
		return NewWindowsError("UpdateResource", err)
	}
	return nil
}
Пример #2
0
func (self *ResourceUpdate) Delete(resourceType ResourceType, resourceId ResourceId, language Language) error {
	err := wrappers.UpdateResource(
		self.handle,
		uintptr(resourceType),
		uintptr(resourceId),
		uint16(language),
		nil,
		0)
	if err != nil {
		return NewWindowsError("UpdateResource", err)
	}
	return nil
}