当前位置: 首页>>代码示例>>Python>>正文


Python win32api.LoadLibrary方法代码示例

本文整理汇总了Python中win32api.LoadLibrary方法的典型用法代码示例。如果您正苦于以下问题:Python win32api.LoadLibrary方法的具体用法?Python win32api.LoadLibrary怎么用?Python win32api.LoadLibrary使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在win32api的用法示例。


在下文中一共展示了win32api.LoadLibrary方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: import win32api [as 别名]
# 或者: from win32api import LoadLibrary [as 别名]
def __init__(self, shell):
        win32gui.InitCommonControls()
        self.hinst = win32gui.dllhandle
        # win32api.LoadLibrary('MSFTEDIT.dll')
        self.shell = shell
        self.hicon = None
        self.list_data = {}
        self.className = "AvaConsole"
        self.title = 'Ava Console'
        self.hwnd = None
        self.job_name = 'job-1'
        self.script = ''
        self.row = 1
        self.col = 1
        self.hidden = False
        self.validator = ScriptValidator() 
开发者ID:eavatar,项目名称:eavatar-me,代码行数:18,代码来源:console.py

示例2: MyComputer

# 需要导入模块: import win32api [as 别名]
# 或者: from win32api import LoadLibrary [as 别名]
def MyComputer(self):
        mc_reg = None
        try:
            mc_reg = _winreg.OpenKey(
                _winreg.HKEY_CLASSES_ROOT,
                "CLSID\\{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
            )
            value, type = _winreg.QueryValueEx(mc_reg, "LocalizedString")
            dll = os.path.split(value.split(",")[0][1:])[1]
            index = -1*int(value.split(",")[1])
            myComputer = LoadString(LoadLibrary(dll), index)
        except:
            myComputer = self.text.myComp
        if mc_reg:
            _winreg.CloseKey(mc_reg)
        return myComputer 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:18,代码来源:__init__.py

示例3: CreateViewWindow

# 需要导入模块: import win32api [as 别名]
# 或者: from win32api import LoadLibrary [as 别名]
def CreateViewWindow(self, prev, settings, browser, rect):
        print "ScintillaShellView.CreateViewWindow", prev, settings, browser, rect
        # Make sure scintilla.dll is loaded.  If not, find it on sys.path
        # (which it generally is for Pythonwin)
        try:
            win32api.GetModuleHandle("Scintilla.dll")
        except win32api.error:
            for p in sys.path:
                fname = os.path.join(p, "Scintilla.dll")
                if not os.path.isfile(fname):
                    fname = os.path.join(p, "Build", "Scintilla.dll")
                if os.path.isfile(fname):
                    win32api.LoadLibrary(fname)
                    break
            else:
                raise RuntimeError("Can't find scintilla!")

        style = win32con.WS_CHILD | win32con.WS_VSCROLL | \
                win32con.WS_HSCROLL | win32con.WS_CLIPCHILDREN | \
                win32con.WS_VISIBLE
        self.hwnd = win32gui.CreateWindow("Scintilla", "Scintilla", style,
                              rect[0], rect[1], rect[2]-rect[0], rect[3]-rect[1], 
                              self.hwnd_parent, 1000, 0, None)

        message_map = {
                win32con.WM_SIZE: self.OnSize,
        }
#        win32gui.SetWindowLong(self.hwnd, win32con.GWL_WNDPROC, message_map)

        file_data = file(self.filename, "U").read()

        self._SetupLexer()
        self._SendSci(scintillacon.SCI_ADDTEXT, len(file_data), file_data)
        if self.lineno != None:
            self._SendSci(scintillacon.SCI_GOTOLINE, self.lineno)
        print "Scintilla's hwnd is", self.hwnd 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:38,代码来源:shell_view.py

示例4: __getitem__

# 需要导入模块: import win32api [as 别名]
# 或者: from win32api import LoadLibrary [as 别名]
def __getitem__(self, filename):
		key = filename.lower()
		return self.__cache.setdefault(key, win32api.LoadLibrary(key)) 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:5,代码来源:win32timezone.py

示例5: __enter__

# 需要导入模块: import win32api [as 别名]
# 或者: from win32api import LoadLibrary [as 别名]
def __enter__(self):
    self._handle = win32api.LoadLibrary(self._path)
    return self._handle 
开发者ID:refack,项目名称:GYP3,代码行数:5,代码来源:gyptest-link-generate-manifest.py

示例6: extract_manifest

# 需要导入模块: import win32api [as 别名]
# 或者: from win32api import LoadLibrary [as 别名]
def extract_manifest(path, resource_name):
  """Reads manifest from |path| and returns it as a string.
  Returns None is there is no such manifest."""
  with LoadLibrary(path) as handle:
    try:
      return win32api.LoadResource(handle, RT_MANIFEST, resource_name)
    except pywintypes.error as error:
      if error.args[0] == winerror.ERROR_RESOURCE_DATA_NOT_FOUND:
        return None
      else:
        raise 
开发者ID:refack,项目名称:GYP3,代码行数:13,代码来源:gyptest-link-generate-manifest.py

示例7: extract_manifest

# 需要导入模块: import win32api [as 别名]
# 或者: from win32api import LoadLibrary [as 别名]
def extract_manifest(path, resource_name):
  """Reads manifest from |path| and returns it as a string.
  Returns None is there is no such manifest."""
  with LoadLibrary(path) as handle:
    try:
      return win32api.LoadResource(
          handle, RT_MANIFEST, resource_name).decode('utf-8', 'ignore')
    except pywintypes.error as error:
      if error.args[0] == winerror.ERROR_RESOURCE_DATA_NOT_FOUND:
        return None
      else:
        raise 
开发者ID:refack,项目名称:GYP3,代码行数:14,代码来源:gyptest-link-update-manifest.py

示例8: __enter__

# 需要导入模块: import win32api [as 别名]
# 或者: from win32api import LoadLibrary [as 别名]
def __enter__(self):
      self._handle = win32api.LoadLibrary(self._path)
      return self._handle 
开发者ID:turbulenz,项目名称:gyp,代码行数:5,代码来源:gyptest-link-generate-manifest.py

示例9: extract_manifest

# 需要导入模块: import win32api [as 别名]
# 或者: from win32api import LoadLibrary [as 别名]
def extract_manifest(path, resource_name):
    """Reads manifest from |path| and returns it as a string.
    Returns None is there is no such manifest."""
    with LoadLibrary(path) as handle:
      try:
        return win32api.LoadResource(handle, RT_MANIFEST, resource_name)
      except pywintypes.error as error:
        if error.args[0] == winerror.ERROR_RESOURCE_DATA_NOT_FOUND:
          return None
        else:
          raise 
开发者ID:turbulenz,项目名称:gyp,代码行数:13,代码来源:gyptest-link-generate-manifest.py

示例10: extract_manifest

# 需要导入模块: import win32api [as 别名]
# 或者: from win32api import LoadLibrary [as 别名]
def extract_manifest(path, resource_name):
    """Reads manifest from |path| and returns it as a string.
    Returns None is there is no such manifest."""
    with LoadLibrary(path) as handle:
      try:
        return win32api.LoadResource(
            handle, RT_MANIFEST, resource_name).decode('utf-8', 'ignore')
      except pywintypes.error as error:
        if error.args[0] == winerror.ERROR_RESOURCE_DATA_NOT_FOUND:
          return None
        else:
          raise 
开发者ID:turbulenz,项目名称:gyp,代码行数:14,代码来源:gyptest-link-update-manifest.py


注:本文中的win32api.LoadLibrary方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。