當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。