I don't think that you would need to use LockImage on a Pixmap, although I haven't checked this.
You can't LockImage a PixMap. LockImage takes a TImage as a parameter, not pixmap. Besides which getting a TPixmaps related TPixmap, seems somewhat redundant.