Ejemplo n.º 1
0
        private Boolean GetResourceNamesCallbackEx(IntPtr moduleHandle, IntPtr pType, IntPtr pName, IntPtr userParam)
        {
            ResourceType type = _currentType;

            ResourceName name = new ResourceName(pName, type);

            UnderlyingAdd(type, _currentName = name);

            NativeMethods.EnumResLangProc callback = new NativeMethods.EnumResLangProc(GetResourceLanguagesCallbackEx);
            NativeMethods.EnumResourceLanguagesEx(moduleHandle, pType, pName, callback, IntPtr.Zero, NativeMethods.MuiResourceFlags.EnumLn, 0);

            return(true);
        }
Ejemplo n.º 2
0
        private bool GetResourceNamesCallback(IntPtr moduleHandle, IntPtr pType, IntPtr pName, IntPtr userParam)
        {
            var type = _currentType;

            var name = new ResourceName(pName, type);

            UnderlyingAdd(type, _currentName = name);

            var callback = new NativeMethods.EnumResLangProc(GetResourceLanguagesCallback);

            NativeMethods.EnumResourceLanguages(moduleHandle, pType, pName, callback, IntPtr.Zero);

            return(true);
        }
Ejemplo n.º 3
0
        private Boolean GetResourceNamesCallback(IntPtr moduleHandle, IntPtr pType, IntPtr pName, IntPtr userParam)
        {
            Win32ResourceType tempType = new Win32ResourceType(pType, this);               // temp type used for finding the one to reference
            Win32ResourceType type     = _types.Find(new Predicate <Win32ResourceType>(delegate(Win32ResourceType resType) { return(resType == tempType); }));

            if (type == null)
            {
                throw new InvalidOperationException("Resource names callback for a type that isn't known.");
            }

            //

            Win32ResourceName name = new Win32ResourceName(pName, type);

            type.Names.Add(name);

            NativeMethods.EnumResLangProc callback = new NativeMethods.EnumResLangProc(GetResourceLanguagesCallback);
            NativeMethods.EnumResourceLanguages(moduleHandle, pType, pName, callback, IntPtr.Zero);

            return(true);
        }