IRC Log Viewer » #firebreath » 2011-12-28

IRC Nick Time (GMT-7) Message
iamamoron 00:12 taxilian: : sorry for my dumbness
but do you have a know blog that provide concrete example that call external dll?
taxilian 00:12 sure don't
sorry
don't confuse ignorance and stupidity, however
ignorance is curable
stupidity usually isn't
actually, I think there is an example in the firebreath codebase itself
!findfile systemhelperswin.cpp
FireBreathBot 00:12 Found 1 matching file(s) in the master branch. First 1 are:
src/PluginCore/Win/SystemHelpersWin.cpp http://goo.gl/CNjOS
taxilian 00:12 look in there
I should have mentioned earlier, but didn't think of it 'til just now
iamamoron 00:12 thanks ill try to read
i have a question on this
#include "../SystemHelpers.h"
#include "shlobj.h"
in my case since it is special dll
what should i include?
taxilian 00:12 those two includes aren't important for what you're doing
you need to know the prototype of the entrypoints you want to call
iamamoron 00:12 so these are standards of calling a dfll?
taxilian 00:12 ?
iamamoron 00:12 i mean everytime i call an external dll I should have those two inits?
taxilian 00:12 when you use LoadLibrary, what you're doing is loading the code somewhere, then you use GetProcAddress to find the location of the entrypoint you want; you store that address in a function pointer and you call it
no
that's just how that particular file does it
you just need to load the library and get the proc address
then you can call it as many times as you need
iamamoron 00:12 systemhelpers.h i understand
because it is the headers of the project
taxilian 00:12 but be sure you FreeLibrary when you're done
iamamoron 00:12 but the shlobj.h
is what confised me
taxilian 00:12 shlobj.h is just a file that contains some of the types I need
iamamoron 00:12 is
taxilian 00:12 that is where the type REFKNOWNFOLDERID is defined, for example
iamamoron 00:12 so there is no need to put in there
in my case
taxilian 00:12 it really sounds like you need a much more thorough grounding in C++; pay special attention when you're researching to function pointers and header files
and how they work
iamamoron 00:12 so in loading shell32.dll systemhelpers.h and shlobj.h is not really related?
taxilian 00:12 shlobj.h contains the types that are used by shell32.dll
systemhelpers.h is just the platform independent interface for the SystemHelpers class
so no, systemhelpers is not related in any way to what you're doing
iamamoron 00:12 one last question pls
taxilian 00:12 shlobj.h is only related in that you need it to call the functions on the DLL because without it you don't know what those types are
iamamoron 00:12 DPFPDevX.dll what should i declare?
taxilian 00:12 not a clue
never heard of it
iamamoron 00:12 it is a dll provided by the digital persona
i want to use it actually
taxilian 00:12 then they should give you a list of entrypoints along with the function prototypes you need
iamamoron 00:12 for example
a dll made in visualbasic
since that dll is really the base
there is a working dll made in vb
i just want to use it
would it be possible?
taxilian 00:12 probably
iamamoron 00:12 with just dll only?
taxilian 00:12 but you need to know what the entrypoints are
and the function prototype
iamamoron 00:12 because in c# i just import it
dont know how to do it in c++
taxilian 00:12 is it an ActiveX object, then?
iamamoron 00:12 that is my problem actually
yes
taxilian 00:12 you're in a whole different country from where you need to be, then
because you don't use LoadLibrary to interface with an activex control
there is an example FB project that embeds an ActiveX control in it; it may give you some ideas
honestly, though, it's not an easy problem
ActiveX is far from straightforward and you don't get any nice handy helpers in c++ like you would in VB or C#
it's not a simple problem, and I need to finish something and go to bed; it's 1am here
iamamoron 01:12 thanks sorry
taxilian 01:12 sorry I can't help more. good luck. you'll need it
iamamoron 01:12 taxilian: it has sample c++ code along with the installer
would it mean it has good chance to work on firebreath?
taxilian 01:12 maybe
all bets are off with activex
it may be using visual studio features that will conflict with FireBreath's own activex code
iamamoron 01:12 One Touch for Windows SDK COM-ActiveX Developer Guide
taxilian 01:12 as I said. maybe
iamamoron 01:12 huh what the F is this
hehehe
i thout it could solve my problem
its getting worst
taxilian 01:12 welcome to the wonderful world of activex
I have 6 books on activex and I still can't figure out what is going on half the time
iamamoron 01:12 it has source file along with it
my problem is integrating it
i was glad earlier when i saw the source code
but sad to say it wont work
aamitgupta 06:12 hi
i am generating build file and getting error on CMake command for when i try to make build prep2010.cmd
it says Cmake is not recognised as internal and external command
please help me what is the problem
i and taking help from video on windows
Sunil_ 07:12 Hi
I am new on FireBreath and I want to create FireBreath project on MAC OS.
hobbes_ 07:12 hi, is there some kind of restriction in setting up NSApplicationPresentationOptions inside a Plugin?
jshanab_wcw 07:12 aamitgupta. you do not have cmake installed or forgot to close and reopen the terminal after the install
Sunil_. I got started by watching the tutorials, the first three are on mac btw.
hobbes_ 08:12 HI anyone can respond to this question ? http://stackoverflow.com/questions/8657426/nsapplicationpresentationoptions-doesnt-work-with-firebreath
panther_ 08:12 Helloooooooooo
i am facing very weird issue..I have developed my own NPAPI plugin and its working on desktop with WebKit QtTestBrowser..But when i cross compiled the plugin code and QtTestBrowser for ARM iMax53..Browser calls NP_Initialize(), NP_GetValue() only..It doesnt call NPP_NEW()
aamitgupta 09:12 i am still facing the issue
i have installed cmake.exe
but not able to make .sln file
taxilian 10:12 aamitgupta: did you tell the cmake installer to add cmake to your path?
and did you restart the command window you're using?
heh. don't even know if he say the message
jshanab_wcw 10:12 I was talking to him at length. He didn't even have VS installed. After the install he still had some errors concerningthe microsoft side of things
taxilian 10:12 well you can only do so much
jshanab_wcw 11:12 Bit of a language barrier. I suggested he go back thru the video tutorials paying attention to the results of each step. He is a mac person.
taxilian 11:12 that's the challenge of a project like this; I'd say 70-80% of the problems we get in here are actually not really plugin related at all, rather it's people trying to learn C++
or cmake
jshanab_wcw 11:12 I meant "english" !
taxilian 11:12 hehe. yeah; but his issues weren't plugin related, but environment
jshanab_wcw 11:12 I was unable to build the test plugin on my new mac. xcode crashes as soon as it starts building. I looked online and it sems the neweset xcode and LION have some issues
taxilian 11:12 huh. it works fine for me
jshanab_wcw 11:12 I will have to start it again after work and hit you up for some mac guidence
taxilian 11:12 I'll help if I can; I may not be around tonight
I have the week off and am trying to catch up on some side projects, but my kids, my wife, and I are all sick
and we have a family gathering thing tonight
jshanab_wcw 11:12 NP low priority job the mac. except for testing my HTTP streams which are working pretty darn good
But what a sucky protocol.
taxilian 11:12 lol
jshanab_wcw 11:12 I want to allow people with iPhones to view a live camera, but it needs 3 segments. so if they are ever gonna connect, i have to create segemnts continuosly and throw them away just so they don't have to wait so long for what will be old data
I can just hear the server fans kick up :-(
taxilian 11:12 hehe
jshanab_wcw 11:12 Don't even get me started on the overhead of packets wrapped in packets sliced into 188 byte chunks ;-)
taxilian 11:12 lol
jshanab_wcw 12:12 taxilian. I tried the BasicMediaPlayer on the mac and got "Internal error Xcode encountered an internal logic error...." Do you think that is something in my env or prep that is wrong or is it an xcode problem. Keep in mind I have never used xcode before so I could be pressing the wrong buttons. It has details! an assertion in PBXTarget.m
taxilian 12:12 I don't know; have you tried just building FBTestPlugin?
jshanab_wcw 12:12 No, i didn't. I will try that. But the assertion is inside xcode's directories!
taxilian 12:12 yeah, I dunno. what version?
of xcode?
jshanab_wcw 12:12 4.2.1 I do not really understand the interface. It says it failed, that is in red right above "no issues" I don't see a list of errors anywhere yet
I don't see any reasons, lists, annotations nothing clickable just "build failed"
dreid 13:12 jshanab_wcw: Try running xcodebuild on the commandline in your build directory. It might be a little easier to find errors with that.
jshanab_wcw 13:12 thanks lots of errors, but what is the interface suppose to look like when there are errors?
dreid 13:12 I have no idea, I tend to avoid xcode.
jshanab_wcw 13:12 looks like it cannot find compiler/ all end with Command /Developer/usr/bin/clang++ failed with exit code 1
dreid 13:12 jshanab_wcw: Put the output in a gist and I'll take a look.
jshanab_wcw 13:12 I think it is missing a library. I guess xcode does not show linker errors. let me try something simpler
dreid 13:12 It'll be there somewhere in the output. It always is, it's just a little dense.
jshanab_wcw 13:12 yeah
http://pastebin.com/KdHhg6Pm
dreid 13:12 Does /Developer/usr/bin/clang++ exist?
jshanab_wcw 13:12 Yup. (better it is part of the xcode install, correct?) I am exp[erienced with linux and gcc from command line just very very new to mac
taxilian 13:12 nirvdrum: heh. okay, I'll bite. What is wrong with copy/paste on Mac OS? (I have never had an issue)
nirvdrum 13:12 It just doesn't copy.
I've resorted to cutting whenever I can just to get a visual indication that something ended up on the clipboard.
taxilian 13:12 really? in what app?
nirvdrum 13:12 All of them.
jshanab_wcw 13:12 I am having to use command-c and command-p ctrl-c and ctrl-v don't work
taxilian 13:12 you mean command-x? command-c is copy...
jshanab_wcw 13:12 I just that and the weird delete were just a mac thing
nirvdrum 13:12 I just tried to copy something a half dozen times from Firefox to paste into an email. Nothing.
taxilian 13:12 ctrl-c and ctrl-v have never been shortcuts for copy/paste on mac...
weird
I've never had an issue with copy and paste on mac
you have some of the strangest issues, my friend
nirvdrum 13:12 And just to verify it's not my keyboard acting up, I've even used the menu entries.
taxilian: I've had this happen to other friends. Usually rebooting the machine fixes it.
taxilian 13:12 huh
nirvdrum 13:12 Every day I edge closer to just booting into Ubuntu and using Windows in a VM for my Office needs.
Of course, I hate the Linux desktop. And as much as I'd rather go to Windows, Ruby runs like balls in that.
jshanab_wcw 13:12 Wow. I am the oposite I run LXDE on most my linux desktops with the CUbe and composite stuff and I prefer it to windows by a landslide. ( I do hate gnome however, the linux desktop is what you make it)
Fresh install, fresh prep of FBTestPlugin and then a build, back to internal error in xcode. I give
taxilian 13:12 jshanab_wcw: anything weird in the cmake output?
is it trying to build the correct project?
nirvdrum: you know, I think you are pretty much the only developer whose opinion I really respect that doesn't prefer a mac over a PC these days
of course, you're also the only one who seems to have all of these problems with them
jshanab_wcw 13:12 he he, gimme a week.
taxilian, prep ran great I have a Q. is a macbook air x64 or x32?
taxilian 13:12 x64
well
depends on the year, I suppose
10.6 and 10.7 are x64
jshanab_wcw 13:12 ok, I figured x64. just one of the options on build. There are multiple projects avail for building, not sure which to build. :-) BuildALL sounds like the obvious spot
Running xcodebuild oin the test plugin does build fine ( a few notes and warnings but it's fine, xcode4.2.1 is just broken)
nirvdrum 13:12 taxilian: I've had problems with Apple products going back to 2000. Originally they were mostly hardware problems. For the most part, I've lucked out hardware-wise lately.
But they've never gotten the Dvorak thing right.
And copy & paste has always been an issue.
And Safari has always bugged out with whatever's in the video card buffer when it starts up.
10.7 also has this really annoying bug where if I wake from sleep and have a monitor connected, it resizes all my windows.
jshanab_wcw 13:12 Ah ha! taxilian what version of OS do you have, a buch of people with new macs are having isues with xcode4.2.1 and Lion 10.7.2
taxilian 13:12 nirvdrum: heh. it's really odd; our experiences are 180 degrees different. dvorak works better for me on mac than windows ever did
jshanab_wcw: I'm probably still on 10.7.1
nirvdrum 13:12 Don't get me wrong, every OS sucks in its own special way. And the grass is always greener on the other side.
I just don't get the cargo cult mentality around Mac.
taxilian 13:12 hehe
nirvdrum 13:12 But, then again, I see lots of developers on MacBook Airs and realize at that point that we may have the same profession, but we don't do the same work.
taxilian 13:12 I find that the mentality is about the same for linux or windows, personally =]
nirvdrum 13:12 taxilian: Maybe it's just that Mac people are more vocal -- at least on Twitter.
taxilian 13:12 and that right there is a huge difference; it all depends on what you do
heh. that could very well be
then again, most of the people I see on twitter are complaining about or poking fun at apple, so maybe it just depends on who you follow
I don't follow very many, so I probably don't have a very good sample
nirvdrum 13:12 Really the only thing I actually prefer about Mac right now is it has incredible battery life.
kylehuff 13:12 I hate every OS equally; but with linux, I don't have to pay money to live in my misery.
taxilian 13:12 heh. the only things I prefer about mac are… well, the user interface, the unix kernel and as such bash console plus ability to run all the linux apps I'd use, the hardware, the stability, and most of all the fact that I spend less than half the time messing with configuration that I always have had to on a windows machine…and 1/4 the time I have to on a linux machine
kylehuff: kudos for being an equal opportunity hater ;-)
kylehuff 13:12 lol; I'm here for whoever needs to be hated...
taxilian 13:12 lol
I swing with time, though; I used to hate mac, but they've gotten better in the last few years and I've switched. I hated the early iphones, but I use one now. I used to hate javascript, and now I'm cursing every second I have to write PHP code because it's so much more tedious than node
nirvdrum 13:12 taxilian: Most Mac people I know prefer the GNU toolchain anyway, so the linux app argument gets weird.
taxilian 13:12 it all depends on what you work on, I think
nirvdrum 13:12 Incidentally, I prefer BSD, but I deploy to Linux, so that's what I have to use.
taxilian 13:12 yeah; there is a lot I like about BSD. I haven't spent a lot of time with it, though, for similar reasons
kylehuff 14:12 my only gripe about the iPhone is the lockin with the hardware. when work switched to a different hardware platform, there was no way to use iOS and get value out of the apps I paid for
jshanab_wcw 14:12 I find the linux command line to be over 1000 times*** faster on printing a line than any windows OS and so much more capable. I wind windows very polished, just don't look to closely. The mac is kinda 1/2 between. *** I have tested this when my windows app failed because I had some printf's for debug
nirvdrum 14:12 Besides, I suspect the Mac environment is just going to become increasingly more hostile. Now with the Mac app store I can be sure to have DRM on everything I purchase. Awesome!
taxilian 14:12 hehe. yeah; I have kinda a love/hate relationship with the mac app store
nirvdrum 14:12 kylehuff: Yeah, that sucks. It almost kept me getting a new iPhone. But I walked away from ~ $85 worth of apps and switched to Android.
taxilian 14:12 jshanab_wcw: having a unix command-line on mac is a *huge* part of why I prefer to use a mac. (I'd like linux too, but I can't do most of what I need)
kylehuff 14:12 same nirvdrum; yeah, I am android now. When I quit my job I replaced my phone with another android, even though I could get a wicked deal on a iPhone
jshanab_wcw 14:12 But I run git+ on windows, vi, kdiff3, Kate, K3b. Drives some windows people nuts. :-)
I agree the one strength of linux are the choices. but that is it's achilles heel also. Mac sems to tkae the best of both windows and linux in that reguard.
taxilian 14:12 yeah
jshanab_wcw 14:12 You can't ask a linux guy a Q without asking what distro?
taxilian 14:12 lol
true
jshanab_wcw 14:12 BTW, I am a gentoo man myself
taxilian 14:12 lol. I used to love gentoo… but then I hit a point that I decided I didn't have 3 days to reinstall each time. 'course, I bet it doesn't take nearly that long these days with the faster processors
jshanab_wcw 14:12 Yeah althought the hardware has gotten better and they start at a binary level now, The overall popularity has dropped and I now find some packages are behind. But I really enjoy the philosophy. It is a "Meta-distro" not a distro
taxilian 14:12 using gentoo is when I really started to understand how the configuration and such works
jshanab_wcw 14:12 RIght. I chose it because I really wanted to learn. Then I found that I liked not having an initrd, just a monolitic kernel compiled for my hardware
For my grad project I wrote a module and modified the VirtualFile System. Really cool when you start to see the kernel as just another piece of code.
dreid 14:12 taxilian: Ok, I've reverted 21 days of changes to a working windows build.
The changes I've made to the plugin specific code are… quite frankly… trivial.
taxilian 14:12 dreid: and it works with the older version?
dreid 14:12 Yes.
taxilian 14:12 dreid: well, if you can give me a summary of the changes I might be able to find some suggestions for you
but I'd just step through things and compare what you've got
meet 16:12 hello. Are there developers here ?
dreid 17:12 taxilian: So, in the working case, the outVar of ActiveXBrowserHost::getComVariant has a tagVARIANT of DISPATCH, in the non-working case it's a safearray of VARIANT.
I can also trigger the failure by using the working plugin w/ the latest version of the javascript we use to load the plugin.
So that is progress.
iamamoron 19:12 taxilian: : good day
i burn my finger and eyes already
but no luck
:(
is it not possible to call an activex dll from vb?
and make it as plugin in browser
taxilian 19:12 dreid: there was a workaround added by someone to use a SAFEARRAY of VARIANT when it's hosted not in a browser but in another ActiveX host; if you are hitting that case in a browser we need to know why
and fix it
iamamoron: you can make a vb.net activex control that will work in IE
and it might be possible to implement an NPAPI plugin with .net, but my guess is you'd need to know a whole lot more about it than you seem to; it would take me a lot of research to figure out how to do it
dreid 19:12 taxilian: I'll keep looking into it and let you know what I come up with.
taxilian 19:12 cool. stepping through that code should turn something up
!find getComVariant
FireBreathBot 19:12 Found 2 possible matches. Displaying 2
/^void ActiveXBrowserHost::getComVariant(VARIANT *dest, const FB::variant &var)$/ (f) found in src/ActiveXCore/ActiveXBrowserHost.cpp: http://goo.gl/fiNiP
/^ inline const ComVariantBuilderMap& getComVariantBuilderMap()$/ (f) found in src/ActiveXCore/ComVariantUtil.h: http://goo.gl/ihQHB
taxilian 19:12 dreid: the prob is here: https://github.com/firebreath/FireBreath/blob/master/src/ActiveXCore/ComVariantUtil.h#L165
for some reason you don't have a window
dreid 19:12 Interesting.
dreid 20:12 Ok, so if I construct an string containing the object tag and inject it into the dom by setting innerHTML on some other element it appears to work. Even though both the working and non-working version of my code use createElement to construct the object tag and add it to the DOM with appendChild.
taxilian 20:12 ohhhh....
yeah
don't ever do that
you do *not* want to set the mimetype or clsid on the object tag before it is in the DOM
it causes nasty race conditions
aparently including this one =]
dreid: always either inject the full tag with innerHTML or wait to finish it w/ the type 'til after it is in the DOM
it used to crash when you do that, but that I fixed… aparently there are some race conditions, though, that can cause some issues still
I'm kinda surprised that's the worst that happened to you
dreid 20:12 And thus was the difference between the working and non-working version of the JS.
the working version does appendChild and then sets the type attribute of the object tag.
dreid 20:12 Well if nothing else, these 2 days of pain led to a new unittest.
taxilian: Thanks for all your help.
This whole plugin development experience has been miserable, especially on windows, I can only imagine how much worse it would be without firebreath.
taxilian 21:12 dreid: heh. you can only imagine; let me tell you, it's every bit as bad as you imagine it might be =]
there is a reason I wrote FireBreath
thank you for being one of the relatively rare few who is willing to dig through yourself and find things
and sorry it didn't occur to me to ask you about that sooner; I've never seen that symptom, but now that I see what is happening it makes sense