[PLUG-Devel] Connect wrapper in c (was OT: C programmers....)

James Finstrom jfinstrom at rhinoequipment.com
Fri Jun 19 09:59:05 MST 2009


Greetings,

The original email is below. but I would like to better explain what I want
and I am a C newb so my terminology can be assumed incorrect...

I have a program I am putting together that basicly connects the gphoto
library to the cwiid library. I am currently connecting the wiimote in
main(). What I want to do is move the connection of the wiimote out of main
but still refer to the handle in main.  So right now in main i connect to
the wiimote and it creates g_wiimote. I then  basicly read/write to
g_wiimote. What I want to do is move that block of code that does the
connect out of main to a function do_connect_wiimote() which will exicute
that block of code and return g_wiimote to main so I can read/write to it.

Thanks in advance for not bashing the newb :)


Original users email:
Greetings all,

I am writing app that allows me to control my canon SLR with my wiimote. I
am trying to figure out how to call a function in main that generats a
handle then returns the handle to main


Concept:

connect(){ connect to wiimote and return handle foo}

main(){ call connect(), get handle, perform actions on that handle}


James Finstrom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.PLUG.phoenix.az.us/pipermail/plug-devel/attachments/20090619/e500da07/attachment.htm 


More information about the PLUG-devel mailing list