Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'api.': 0.05; 'subject:trying': 0.09; 'api': 0.11; 'cc:addr:python-list': 0.11; 'python': 0.11; 'from:addr:pobox.com': 0.16; 'from:addr:skip': 0.16; 'subject:python': 0.16; 'sender:addr:gmail.com': 0.17; 'wrote:': 0.18; 'trying': 0.19; 'written': 0.21; 'example': 0.22; 'aug': 0.22; 'cc:addr:python.org': 0.22; 'dll': 0.24; 'skip': 0.24; 'subject: .': 0.24; 'cc:2**0': 0.24; "i've": 0.25; 'post': 0.26; 'header:In-Reply-To:1': 0.27; "doesn't": 0.30; 'message- id:@mail.gmail.com': 0.30; 'work.': 0.31; 'ctypes': 0.31; 'interface': 0.32; 'but': 0.35; 'received:google.com': 0.35; 'two': 0.37; 'pm,': 0.38; 'little': 0.38; '12,': 0.39; 'how': 0.40; 'full': 0.61; "you're": 0.61; 'to:addr:gmail.com': 0.65; 'useful.': 0.68; 'directly.': 0.95 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=RnG9kuLo5WOX+0KiD3p4/w4MAsghja+sxU+HIwKAEUg=; b=NTU8h5ix90G2OPGTq7kT2Ad+RJt8W9bRG7t/X0sl+ho0pJswplwKvBrVTgqf6lT8Zq pB9r8PNmAf/r1ljekBH+DtEQGb71kntMParepfJ9HfVcxPGHn3WenDK34Ec6Dc6eSE7W obReHvVu5FwdMU7IfZ3p0prg8ZMzd6Khd9xyCAzGZ5d1x0cMGZScRdJc7Kz0HGXwCJn7 F+G00OqSyBx/qptZ4GLd736TsBQVPJ2XsV27a5VCHbFnjdiL1YCESWMMUA1VC2D/ASEy skByw1nG9F+Gl3LcVfP3hgo4fiaLx6VlTqgrbmqhc0GaGLBoA9j1wkvYnuFe+fBVTIOI liCw== MIME-Version: 1.0 X-Received: by 10.50.119.105 with SMTP id kt9mr888565igb.20.1407869281077; Tue, 12 Aug 2014 11:48:01 -0700 (PDT) Sender: skip.montanaro@gmail.com In-Reply-To: <3dade0aa-55ca-4e52-af08-8104e9edf4c3@googlegroups.com> References: <3dade0aa-55ca-4e52-af08-8104e9edf4c3@googlegroups.com> Date: Tue, 12 Aug 2014 13:48:01 -0500 X-Google-Sender-Auth: ETAYygHp9zLGbX4wxJAXD6ObZbA Subject: Re: Begginer in python trying to load a .dll From: Skip Montanaro To: c1223 Content-Type: text/plain; charset=UTF-8 Cc: Python X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1407869289 news.xs4all.nl 2841 [2001:888:2000:d::a6]:35138 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:76134 On Tue, Aug 12, 2014 at 1:36 PM, c1223 wrote: > I've trying with ctype, but it doesn't work. Can you post a small example of how you're trying to use cypes? I don't think a full example would be necessary, but knowing the API of one or two functions and how you're trying to call them from Python would be useful. Just as the off-chance your DLL was written in C++... I don't think you can interface with ctypes directly. I think you would have to write a little shim DLL which exposes a C-compatible API. Skip