×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Sep 2006
    Location
    Sarajevo, Bosnia and Herzegovina
    Posts
    166

    Ctypes issues???Need help on this

    Hello pythonerz, look, i have been working on ctypes again, and i realy don't know why i am having troubles with it.
    This is code that crashes Ped (dev cert) and Python (selfsigned):

    Code:
    import ctypes as c
    import _ctypes as x
    import e32
    
    """
    to use keylock with ctypes we need two functions from avkon.dll
    EnableWithoutNote() and DisableWithoutNote()
    to acomplish this, we need first to know ordinals, in older versions of sdks we were able to export ordinals by command line function "nm" but now i tried on 5th and i got message "device not supported" so i wrote own library for func exporting.
    """
    #EnableWithoutNote=90
    #DisableWithoutNote=91
    
    avkondll=x.dlopen("avkon.dll") # we loaded avkon and its handler is in avkondll member
    
    EnableWithoutNote=x.dlsym(avkondll,"90")
    DisableWithoutNote=x.dlsym(avkondll,"91")
    
    """
    now we need something to prove success:
      e32.ao_sleep(few seconds)
    """
    
    x.call_function(EnableWithoutNote,())
    print "locked"
    e32.ao_sleep(5)
    x.call_function(DisableWithoutNote,())
    print "unlocked"
    
    """
    yea, everything is nice, BUT NOT WORKING.....crashing PED :-O why?
    """
    when i install devcert _ctypes i get import errors :-O omG, what is wroooong?


    Hope somebody will know the answer and how to solve it

    br
    wook

  2. #2
    Registered User
    Join Date
    Sep 2006
    Location
    Sarajevo, Bosnia and Herzegovina
    Posts
    166

    Re: Ctypes issues???Need help on this

    noone? omg where this platform leads.......

  3. #3
    Registered User
    Join Date
    Feb 2010
    Posts
    27

    Re: Ctypes issues???Need help on this

    What arguments takes those function? No arguments?

  4. #4
    Registered User
    Join Date
    Sep 2006
    Location
    Sarajevo, Bosnia and Herzegovina
    Posts
    166

    Re: Ctypes issues???Need help on this

    right, no arguments...or i am wrong?
    as defined in AknKeyLock.h:
    Code:
    .
    .
    .
    IMPORT_C void EnableKeyLock();
    IMPORT_C void DisableKeyLock();
    ...
    IMPORT_C void EnableWithoutNote();
    IMPORT_C void DisableWithoutNote();
    .
    .
    .

Similar Threads

  1. Need help on this.
    By TooTough in forum Qt
    Replies: 6
    Last Post: 2010-11-02, 08:00
  2. I really need help on this issue
    By xchewy in forum Symbian
    Replies: 3
    Last Post: 2008-05-20, 00:17
  3. need help on this compile error
    By doesitmatter in forum Symbian
    Replies: 1
    Last Post: 2007-12-16, 21:51
  4. Replies: 0
    Last Post: 2005-06-17, 16:19

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×