Thread: [shouting] Does anybody have an example of using lock and unlock? [/shouting]

  1. #1
    left crog... back when? incognito's Avatar
    Join Date
    Oct 2001
    Posts
    1,427

    [shouting] Does anybody have an example of using lock and unlock? [/shouting]

    I am having problems with this, so I am looking for a little piece of code that uses this, so I can try and make some sense of it, please contribute if you could.
    There are some real morons in this world please do not become one of them, do not become a victim of moronitis. PROGRAMMING IS THE FUTURE...THE FUTURE IS NOW!!!!!!!!!

    "...The only real game I thank in the world is baseball..." --Babe Ruth

    "Life is beautiful"-Don Corleone right before he died.

    "The expert on anything was once a beginner" -Baseball poster I own.


    Left cprog on 1-3-2005. Don't know when I am coming back. Thanks to those who helped me over the years.

  2. #2
    Used Registerer jdinger's Avatar
    Join Date
    Feb 2002
    Posts
    1,065
    You would use lock and unlock to manipulate the surface by individual pixel changes. The only examples I've ever seen for it (I don't use lock/unlock, don't have a need for it) were to do a pixel-perfect collision detection test or to do some special effects (like fire) by changing pixels.

  3. #3
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    What do you want to lock and unlock?

  4. #4
    left crog... back when? incognito's Avatar
    Join Date
    Oct 2001
    Posts
    1,427
    Originally posted by Shiro
    What do you want to lock and unlock?
    just anything, I want to see a code of it at work, because the book doesn't explain it real good. I want to see it at work.
    There are some real morons in this world please do not become one of them, do not become a victim of moronitis. PROGRAMMING IS THE FUTURE...THE FUTURE IS NOW!!!!!!!!!

    "...The only real game I thank in the world is baseball..." --Babe Ruth

    "Life is beautiful"-Don Corleone right before he died.

    "The expert on anything was once a beginner" -Baseball poster I own.


    Left cprog on 1-3-2005. Don't know when I am coming back. Thanks to those who helped me over the years.

  5. #5
    Used Registerer jdinger's Avatar
    Join Date
    Feb 2002
    Posts
    1,065
    Originally posted by Shiro
    What do you want to lock and unlock?
    He's talking about locking/unlocking DirectDraw surfaces.

    El, check out this for a code example.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Thread safe double linked list
    By ShwangShwing in forum C Programming
    Replies: 7
    Last Post: 06-02-2009, 10:55 AM
  2. Replies: 10
    Last Post: 07-17-2008, 11:21 AM
  3. gap between an unlock and a lock..
    By underthesun in forum C++ Programming
    Replies: 7
    Last Post: 06-17-2008, 12:51 AM
  4. Smart pointer class
    By Elysia in forum C++ Programming
    Replies: 63
    Last Post: 11-03-2007, 07:05 AM
  5. lock and unlock
    By munna_dude in forum C Programming
    Replies: 2
    Last Post: 05-18-2007, 05:52 AM