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

This is a discussion on [shouting] Does anybody have an example of using lock and unlock? [/shouting] within the A Brief History of Cprogramming.com forums, part of the Community Boards category; I am having problems with this, so I am looking for a little piece of code that uses this, so ...

  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,386
    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, 11:55 AM
  2. Replies: 10
    Last Post: 07-17-2008, 12:21 PM
  3. gap between an unlock and a lock..
    By underthesun in forum C++ Programming
    Replies: 7
    Last Post: 06-17-2008, 01:51 AM
  4. Smart pointer class
    By Elysia in forum C++ Programming
    Replies: 63
    Last Post: 11-03-2007, 08:05 AM
  5. lock and unlock
    By munna_dude in forum C Programming
    Replies: 2
    Last Post: 05-18-2007, 06:52 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21