Porting to Carbon, Lock/UnlockPortBits and Lock/UnlockPixels

I am porting an OS 9 app to Carbon and then Mac OS X.
In the original source, I might have something like:
GetGWorld (&currPort,&currDev);
SetGWorld (mGridPictGW->gw, nil);
LockPixels ((mGridPictGW->gw)->portPixMap);
// do some drawing here
SetGWorld (currPort,currDev);
UnlockPixels ((mGridPictGW->gw)->portPixMap);
The LockPixels() and UnlockPixels() calls are now causing compiler errors (CW) for
"illegal use of incomplete struct/union/class 'OpaqueGrafPtr'"
I know, from reading the porting docs, that I need to handle this
with the new ACCESSORS, but my question is about the new function
Lock/UnlockPortBits(). It says in the docs that "this is not a
replacement for Lock/UnlockPixels()". So do I need to use both
of them? Do I now need to rewrite the above code to look like this?
GetGWorld (&currPort,&currDev);
SetGWorld (mGridPictGW->gw, nil);
LockPortBits(mGridPictGW->gw);
LockPixels(GetPortPixMap(mGridPictGW->gw));
// do some drawing here
SetGWorld (currPort,currDev);
UnlockPixels ((mGridPictGW->gw)->portPixMap);
UnockPortBits(mGridPictGW->gw);
Or do I use this new function instead of Lock/Unlock Pixels? Or is
this new function not even needed here, and I simply need to rewrite
the Lock/UnlockPixels() calls as shown, using the GetPortPixMap() accessor?
Thanks for any advice.
Stephen
G4 Dual 800 QuickSilver / PBook G4 Titanium   Mac OS X (10.3.9)  

If you're drawing from a GWorld to a window, you don't need to call LockPortBits(). QuickDraw does the lock for you. Call Lock/UnlockPortBits() only when you need to directly access a Mac OS X window's back buffer.
  Mac OS X (10.4)  

Similar Messages

  • Carbon X1, OneLink and non-working USB ports

    I have a Carbon X1 (2014) and the ThinkPad OneLink Dock (4X10A06077). I have Windows 7 Pro installed. Sometimes when the system returns from sleep the OneLink taskbar icon displays "Detached!". Even though the icon says Detached!, the display attached to the dock is working, but the USB ports do not function. I lose mouse and keyboard; unplugging/plugging does not work. USB ports on the Carbon X1 do work. I have not verified whether or not Ethernet also fails as I am using WIFI at this time. The USB ports on the dock continue to not work after restarting the laptop. Power cable needs to be unplugged from the dock before the USB ports work again. I have updated all drivers. The BIOS is up to date. I've disabled all power management on the USB ports in the Windows Device Manager. However, the problem persists. Thanks

    Welcome to the forums. Lots of good information and help to be had here.
    OK, first, let us know more specifically which of five flavors of Power Mac G5 you have. Find the serial number on the build plate on the inner bottom panel just below the CPUs and use this site to get the exact configuration:
    http://www.chipmunk.nl/klantenservice/applemodel.html
    In the meantime, assuming that you haven't replaced the PRAM battery in quite a while or ever, that would be a good thing to do.
    Getting dust out of the system is a must. The power supply is especially prone to dust buildup. You might want to deal with that by taking the machine outside, as it can get pretty thick coming out.

  • Os X Server 10.4.9+4 eth ports+firewall active: 1 port is totally locked

    Ciao to all.
    I need a strong help!
    I have an XServe where I run few application: AFP, Web, 4Dimension, PureFTP and few other services.
    I decided to use 2 of the 4 ethernet ports for a direct connection with 2 G5 used for graphics jobs (192.168.3.1 and 192.168.4.1).
    The other 2 eth ports are used:
    1) for the web services (the principal in list on "Network" panel) (192.168.0.25)
    2) for internal use (AFP , Print etc etc) for the iBooks of the sales department (192.168.0.2)
    As described above, the two G5 are directly connected to the card and the other 2 eth ports, on a switch with the rest of tha lan.
    I used the Gateway Setup Assistant in order to prepare the routing of the 2 ports directly connected .
    I choose the first port ( 192.168.0.25) as main port for internet routing and I choose the 2 G5's port (192.168.3.1 and 192.168.4.1) as lan that needs to be routed..
    I did NOT choose the eth port I use for internally purposes (192.168.0.2)......
    Generally, the Assistant made a good job; I mean from the 2 G5 I can see ALL the services published on the server AND they are correclty routed on Internet.
    The problem is on the port internally dedicated.
    When the firewall starts, all the ports of the 192.168.0.2 are filtered!
    No way to see one open port.........
    I don't have lot of knowledge about firewalling; someone can suggest me a way to make this eth port "free" again?
    GRAZIE
    Rob (Italy)

    I don't understand your settings. Either your ISP is misleading you, or they are doing something very unusual.
    >The other eth port was used for internal connection but I had to use the same subnet because , always for ISP settings, to surf on internet, I'm allowed to use ONLY a specific range 192.168.0.2to192.168.0.25.
    There is no valid network that run from 192.168.0.2 through 192.168.0.25. The closest you can get is a /27 network which uses the subnet mask 255.255.255.224, but that gives you the IP address range 192.168.0.1 through 192.168.1.32.
    It's possible that's what you've got, but I've never seen an ISP hand out a /27 in the 192.168.0 network. Usually they hand out a small number of real-world IP addresses and you use a router to share that address amongst clients on your own private network, but then you wouldn't be limited to such a small subnet.
    Can you report all the numbers in the Network Preferences, including subnet mask and router address.
    If all your client systems in the same 192.168.0.x network there's no need to use a second NIC in the server - they can all talk to the server on the 192.168.0.25 address.

  • External video projector - How can I hook up my Mini DisplayPort to DVI Adapter onto my new MacBookAir if the machine does not have a mini port (but only 2 USBs and 1 Thunderbolt)?

    Hi
    How can I hook up my DVI Adapter onto my new MacBookAir if the machine does not have a mini port (but only 2 USBs and 1 Thunderbolt)?
    Is there a DVI adaptor already for Thunderbolt?
    Thanks,
    JFR

    The Mini Display port and Thunderbolt port use compatible connector bodies. Your current Mini Display to DVI or VGA adapter will still work as before on the newer Thunderbolt capable machines.

  • How do I port my Windows Word, Excel, and Powerpoint files to the MAC?  What software is needed on the MAC to use them?  Thanks.

    How do I port my Windows Word, Excel, and Powerpoint files to the MAC?  What software is needed on the MAC to use them?  Thanks.

    You can certainly use iWork, though I hesitate to recommend it to a seasoned Windows user simply because it would add another level of the unfamiliar with which you would have to gain familiarity. The iWork applications are certainly very competent and in most respects both easy to use and surprisingly powerful. They are not 100% compatible however, though that typically manifests itself in document formatting issues rather than anything more significant.
    I have never attempted to import emails from a Windows system into MacOS - other than in Outlook connected to an Exchange server, thus not really an issue at all. I doubt that the Mail app in MacOS can import directly, but of course you could always set the account(s) up on the Mac and then forward emails you want to keep from the PC. Not elegant, but it works. Virtually any Windows document or file, whichever application created it, can be opened or converted for use on a Mac, and using both systems on my desk each day I rarely see any issues switching stuff from one machine to the other. You may stumble over one or two issues, but likely not significant.
    In switching platforms there will be some inevitable issues, not so much with being able to import your stuff because there's usually a workaround or a utility that can help, but just with getting familiar with the platform and the differences between Windows and MacOS that can obscure their similarities. From time to time the support community here hears from a user who has found the migration very problematic and regrets it, but for the most part the phrase 'I should have done this years ago...' is rather more prevalent!

  • Should I get a 2.0 or 3.0 USB external hard drive for my 2011 Macbook Pro? I need it to be compatible with the USB ports of both a PC and a Mac.

    Should I get a 2.0 or 3.0 USB external hard drive for my 2011 Macbook Pro? I need it to be compatible with the USB ports of both a PC and a Mac. I was thinking of getting a Seagate becuase apparently it is compatible with both systems, but I want to know which would be a better investment.

    Using USB 3 devices on Mac computers FAQ

  • I have a dvr and I want to monitor from my phone.  this worked when I had a Belkin router that let me open ports.  I use "canyouseeme" and it can't see 80, 9000 or 1025. How do I make them available?

    I have a Lorex DVR that I want to monitor from my IPhone and IPad.  I used to be able to do this when I had a Belkin router (easy to open ports) but I bought the AirPort Extreme router and no longer have that capability.  When I use "canyouseeme" they can NOT see 80, 9000 or 1025.  Lorex says I need them all available in order to access.  Help!  And all the help I see refers to a earlier version of the AirPort Utility so I cant use those to look at anything, I cant find the same screens, I have version 6.1 (610.31).  I also don't really understand how ports work, so I need a pretty basic explanation.

    Well...I went to the modem (Westell, WireSpeed), found the NAT settings, once again, I'm WAY over my head, I am assuming this is a TCP connection (as opposed to a UDP) and per Lorex my mobile devices will use port 1025.  So I gave it a "global port range" of 1-10 and I indicated that the "base host port" was 80, 1025, & 9000 (ports 1,2,3).  When I selected the 'enable' it asked for a "host devise" my choices are my IPhone, IMac and the IP address for the dvr, so I choose the dvr.  I still cannot connect and canyouseeme still can NOT find these open ports.  This is taking up my whole day! I don't know how people figure this stuff out.

  • Can I connect an external hard drive to one of the ethernet port of the airport extreme and access it from my Mac or PC?

    Can I connect an external hard drive to one of the ethernet port of the airport extreme and access it from my Mac or PC?

    If this hard drive is part of a NAS device, then yes it should be accessable from either a Mac or PC while connected to the AirPort Extreme Base Station (AEBS) by Ethernet.

  • HT4356 I have an older HP connected to the usb port of my Time Machine, and have it shared.  I want to print from my iPhone on the network, but it can not be found in airport?  How do I make this work?

    I have an older HP connected to the usb port of my Time Machine, and have it shared.  I want to print from my iPhone on the network, but it can not be found in airport?  How do I make this work?

    AirPrint printers connected to the USB port of the Apple AirPort Base Station or Time Capsules are not supported with AirPrint.
    Read through this for information about Airprint printers and how to use them:
    http://support.apple.com/kb/ht4356

  • Best way to hook a Mini display port to a vga projector AND a vga monitor

    I am looking for the best way to hook a Mini display port to a vga projector AND a vga monitor for use in a classroom, right now I am thinking a Mini displayport adapter to a splitter.

    The Thunderbolt port is the one to use; you use the same mini-DisplayPort adapter you used for the older minis.
    Regards.

  • I have purchased a new iPhone on the online store, but how come Apple can send me an repacking old device (with scar on both the border and the cable port)!!!!  And after I phone to their hotline for the issue, they asking to give me hk$400 cash coupons??

    I have purchased a new iPhone on the online store, but how come Apple can send me a repacking old device (with scar on both the border and the cable port)!!!!
    And after I phone to their hotline for the issue, they asking to give me hk$400 cash coupons???? This action make me very angry. I have pay for my goods, but they are giving me some repacking rubbish, and trying to treat me as a beggar????
    I have make the request to give me back a new device in good conditions, I will wait and look for what they will delivery.

    Do you feel better now that you have vented?
    This is a user to user forum... if you want/need assistance, contact Apple directly.

  • Create port channel between UCS-FI and MDS 9124 (F Mode)

    Dear Team,
    We were trying to create  port channel between UCS FI and MDS 9124
    But the port channel not getting active in F mode on MDS 9124
    FI is in FC End Host Mode
    We have enabled FC uplink trunking on FI
    We have enabled NPIV on MDS
    We have enabled trunk on MDS
    FI and MDS in default VSAN
    To check we changed the FI mode to FC Switching mode and port channels became active but in E mode
    when we enabled FC uplink trunking on FI and FC Switching mode port channels became active in TE mode
    but in both the above cases showflogi database shows WWPN of SAN alone not showing any from FI.
    How to achive this?
    Have read that no need to change the swicthing mode to FC Switching mode and keep as FC Endhost mode
    SO how to achieve Port channel with F mode in MDS and FI ( Mode showing as NProxy)
    Does it has to do anything with MDS NX-OS version? (https://supportforums.cisco.com/thread/2179129)
    If yes how to upgrade as license for ports came along with Device and we do not have any PAC/PAK or license file as it came
    with license
    Also we have seen 2 files availabe for download (m9100-s2ek9-kickstart-mz.5.2.8b.bin and m9100-s2ek9-mz.5.2.8b.bin) which to use
    Thanks and Regards
    Jose

    Hi Jo Bo,
    what version of software if your MDS running?
    On your UCS do connect nxos and show inteface brieft and look at the mac address.
    it is possible that you might be hitting the bug below. if this is the case you might need to upgrade the firmware on your MDS.
    Add MAC OUI "002a6a", "8c604f", "00defb" for 5k/UCS-FI
    http://tools.cisco.com/Support/BugToolKit/search/getBugDetails.do?method=fetchBugDetails&bugId=CSCty04686
    Symptom:
    Nexus switch unable to connect any other Nexus or other Cisco Switch in NPV mode with a F port-channel.   Issue might be seen in earlier 5.1 releases like
    5.1.3.N1.1a
    but not the latest
    5.1.3.N2.1c
    release. Issue is also seen in
    5.2(1)N1(1)
    and
    6.0(2)N1(1)
    and later releases.
    Conditions:
    Nexus configured for SAN PortChannels or NPIV trunking mode Nexus connected to UCS via regular F port channel where UCS in NPV mode  NPV edge switch: Port WWN OUI from UCS FI  or other Cisco manufactured switch:  xx:xx:00:2a:6a:xx:xx:xx   OR  xx:xx:8c:60:4f:xx:xx:xx
    Workaround:
    Turn-off trunking mode on Nexus 5k TF-port Issue does not happen with standard  F-PORT Remove SAN Portchannel config
    Further Problem Description:
    To verify the issue please collect  show flogi internal event-history errors  Each time the port is attempted OLS, NOS, LRR counters will increment. This can be determined via the following output,  show port internal info all show port internal event-history errors

  • I'm using windows 7, trying to download pictures from my canon 5d mark 2, but when I click import, the camera does not appear. I've tried changing USB ports, switching the camera on and off, trying a different USB cord, tried a different camera, but nothi

    I'm using windows 7, trying to download pictures from my canon 5d mark 2, but when I click import, the camera does not appear. I've tried changing USB ports, switching the camera on and off, trying a different USB cord, tried a different camera, but nothing. Please help! This problem only started a few days ago on lightroom 3.6, upgraded to 5.5, but still not working. Thanks.

    Can you see the Canon EOS camera and image files using Windows Explorer? If not disconnect the camera, close all applications' shutdown Windows, and TURN OFF the power to your system and ALL connected devices. Disconnect all phones, iPads, and any other USB devices and restart your system.
    Retry Windows Explorer and see if your camera is showing. If so try LR import again.

  • How can I do to communicate to parallel port using labview 5.0 and NT ?

    I am trying to write and read from parallel port using Labview 5.0. It does not work with NT.
    How can I do to communicate to parallel port using labview 5.0 and NT ?
    Thank you in advance.
    Regards,

    If you are trying to use In/Out port functions that come with LabVIEW they will not work with NT. I think the AccessHW file at the following link will fix that problem:
    http://zone.ni.com/devzone/explprog.nsf/6c163603265406328625682a006ed37d/49664743ded6f1da862564bc004e3a7f?OpenDocument
    Try also this link:
    http://zone.ni.com/devzone/conceptd.nsf/2d17d611efb58b22862567a9006ffe76/0989d3d9dafae64e8625680400679736?OpenDocument
    and do some searchs at NI.com for parallel port, you should find some more usefull info.
    Good luck
    Brian

  • Since I've upgraded to Maverick the airpot utility does not recognise that there is a time capsule on the wireless network. I can see the TC using the air port utility on my iPhone5 and on my iPad. What am I doing wrong on my macbook?

    Since I've upgraded to Maverick on my Macbook Pro the airpot utility does not recognise that there is a time capsule on the wireless network. I can see the TC using the air port utility on my iPhone5 and on my iPad. What am I doing wrong on my macbook?

    I have over 250G backed up and I really don't want to reset everything and start again.
    Not sure what you mean here. 
    A reset will not affect any of the data on the Time Capsule hard drive.  You would have to perform a completely separate and very deliberate Erase Disk operation for that to occur.
    I'm not recommending that you perform a default reset, but it is an option if there is really nothing else to try.
    I don't know if what you are seeing is a Mavericks issue or not, since I refuse to use any new software until at least the first major update with fixes comes along.
    Another user may be able to offer more input on Mavericks.

Maybe you are looking for

  • Values not picking in J1IS

    Dear Gurus I doing vendor returns for partial quanity in 122 MT and against this Material Document I am trying to post the excise invoice in J1IS here system is  not picking the values.Kindly suggest me to solve this issue Regards MK

  • How to create and best utilize a central portfolio of documents for sharing?

    I'm a teacher who is part of a group of teachers that service different schools and we only see each other once a week, yet we use a lot of the same forms that are required. I want to create a portfolio for our group that would include folders with f

  • Current period, Previous Period and Sum from starting to current period

    Dear Friends, I have a typical requirements to push the following 3 KF into a .CSV format from BW CUBE. 1.Amount of Current period, 2............Previous Period 3............Sum from starting to current period Cube is stored at period level.. Can any

  • IMac wakes on its own after putting it to sleep

    Just got my iMac back from the shop with a new hard drive put in. After setting it up, it seems to wake from sleep on its own after a few minutes. Only change since before sending it in to be fixed (when i had no issues with sleep) is that I now have

  • Positioning pics and text (pic included now)

    Howdy, Using dreamweaver, I'm trying to position to pics and 2 text <p> tags. I want it to look like the graphic below (taken from a .pdf file), but am having a difficult time. I'm looking to add code inline to either the html or a css style, whichev