Trying to Interop a functionality from the Outside In API from Oracle.
Have the following function:
SCCERR EXOpenExport {VTHDOC hDoc, VTDWORD dwOutputId, VTDWORD dwSpecType,
VTLPVOID pSpec, VTDWORD dwFlags, VTSYSPARAM dwReserved, VTLPVOID pCallbackFunc,
VTSYSPARAM dwCallbackData, VTLPHEXPORT phExport);
From the header files I reduced the parameters to:
typedef VTSYSPARAM VTHDOC, VTLPHDOC *
typedef DWORD_PTR VTSYSPARAM
typedef unsigned long DWORD_PTR
typedef unsigned long VTDWORD
typedef VTVOID* VTLPVOID
#define VTVOID void
typedef VTHDOC VTHEXPORT, *VTLPEXPORT
These are for 32 bit windows
Going through the header files, the example programs, and the documentation I found:
1. That pSpec could be a pointer to a buffer or NULL, so I set it to a IntPtr.Zero (documentation).
2. That dwFlags and dwReserved according to the documentation "Must be set by the developer to 0".
3. That pCallbackFunc can be set to NULL if I don't want to handle callbacks.
4. That the last two are based on structs that I wrote C# wrappers for using the [StructLayout(LayoutKind.Sequential)]. Then instatiated an instance and generated the parameters by first creating a IntPtr with Marshal.AllocHGlobal(Marshal.SizeOf(instance)), then getting the address value which is passed as a uint for dwCallbackData and a IntPtr for phExport.
The final parameter list is as follows:
1. phDoc as a IntPtr which was loaded with an address by the DAOpenDocument function called
before.
2. dwOutputId as uint set to 1535 which represents FI_JPEGFIF
3. dwSpecType as int set to 2 which represents IOTYPE_ANSIPATH
4. pSpec as an IntPtr.Zero where the output will be written
5. dwFlags as uint set to 0 as directed
6. dwReserved as uint set to 0 as directed
7. pCallbackFunc as IntPtr set to NULL as I will handle results
8. dwCallBackDate as uint the address of a buffer for a struct
9. phExport as IntPtr to another struct buffer
still get an undefined error from the API. Meaning that the call returns a 961 which is not defined in any of the header files. In the past I have gotten this when my choice of parameter types are incorrect.
I started out using Interop Assistant which was helpful in learning how many of the parameter types get translated. It is however limited by how well I am able to glean the correct native type from the header files. For example the hDoc parameter used in the preceding function was defined as a non-filesytem handle, so attempted to use Marshal to create a handle, then used an IntPtr, and finally it turned out to be an int (actually it was &phDoc used here).
So is there a more scientific way of doing this, other than trial and error?
Jim
There might have been a restriction on originating (making) calls (voice or data)
from mobile phones without an explicit user permission
i.e. a window would pop-up, asking the user to press 'Yes'/approve or 'No'/cancel
for a call attempt made by a software application on that cellphone/mobile.
There seems though to exist API for making calls, voice calls and data calls, on various
embedded OS like WM, Symbian and Android. Do they require a user button-press then?
In the example of jQuery's find()
(the doc is at http://api.jquery.com/find/)
Is
$('li.item-ii').find('li')
the same as
$('li.item-ii li')
essentially, all the <li> elements inside the <li> element that has the class item-ii
Similarly
$('#id1').find(".class1 #id2")
is the same as
$('#id1 .class1 #id2")
?
I am writing a serial communication program in userspace. I want to check how much of the buffer is full. Is there a way to do it using linux terminal i/o api?
Thanks
Im using the Twitter API to read the Favorites RSS, it generates the following output:
http://vl3.co.uk/favs/getfavs.php
I'm not sure why this file seems to be incorrect, doesnt come up in my RSS reader or render correctly in the browser. Can anyone shed any light on this?
If the output is not valid RSS how can I make it so?
Secondly I'd like to cache the RSS feed to then use something like Magpie RSS Parser.
I am running a test rig with IIS6 serving an ASP.NET (and Sharepoint) web site. We have several clients, and so we have custom root Web.config files for each client.
For this test rig, I want to just serve straight from the Trunk of our source control. However, I'd like to be able to select different root Web.config files based on the URL (or port or whatever) I use to access the site, so I can just use one checkout of the source and run all the sites with their appropriate settings.
Is this possible?
Googled for this to no avail. Didn't find anything in the API either. I was expecting some kind of class method or configuration option to set it...
So, rather than calling
from "[email protected]"
for every method, it could be called automatically.
Hello,
I'd like to learn how to effectively use Swing Application Framework. Most of the the examples I've found are blog entries that just explain how to great it is to extend SingleFrameApplication and override its startup method, but that's about it. Sun's article is almost two years old, as is the project's own introduction, and there has apparently been some evolution since then.
Are there any recent and thorough tutorials/HOWTOs available anywhere? There is JavaDoc of course, but it's hard to get the big picture from there. Any pointers are appreciated.
Update: I realized that there's a mailing list archive at the project's site. While somewhat clumsy (compared to StackOverflow ;) it seems to be quite active. Still it's a pity that there are no real tutorials anywhere. The information is scattered here and there.
Update 2: Let me clarify - I'm not having trouble using Swing (the widget toolkit) itself, I'm talking about its Application Framework, which is supposed to ease things like application lifecycle (startup, exit and whatever happens between them), action management etc. - that is, things that most Swing applications will need. It's cool to get such framework to be standard part of Java. The only problem is to learn how it's intended to be used.
Update 3: For the interested, there was just some discussion at the project's forum regarding the current state and future of JSR 296. Shortly: the current version 1.03 is considered to be quite usable, but the API is not stable and it will change to the final version in Java 7. The package name will also change so Java 7 will not break current applications made on SAF.
Update 4: Karsten Lentzsch stated at the above mentioned forum: "I doubt that it can be included in Java 7; and I'll vote against it.". I would rather not question the sincerity of this great guru, and it's certainly wise not to let anything flawed to slip into the core JDK, but frankly it's a strange situation - he is the author of JGoodies Swing Suite which is partly a commercial competitor of JSR 296, and he is sitting in the committee that will decide whether this JSR will be included to standard Java. It was the same thing with JSR 295 Beans Binding which I wrote about earlier.
Given the current state of SAF, I think the best solution is to wrap the current implementation into a "homebrew" framework, which can then accommodate possible changes to the existing API.
Is there any way to do this? It seems the only possible way to do this is by using ruby/tk and creating a tcl interpreter through that api. However, I'd like to use this on a system with no GUI (x windows). Am I out of options?
Thanks
I am trying to page through a results from an REST API call that supports paging. I would like the UI to just be a list view that as I scroll, the new content is retrieved.
Is anybody knows any API that can help to distinguish Mac OS X "Server edition" from "Desktop edition"?
My application should know on which edition of Mac OS X it currently running. (Server or Desktop)
Hi,
I need to rotate the video player on iPhone (or let it autorotate).
I know the webview solution, but here come the problem, I need to play several video (distant), and WebView can't provide me a stopSelector.
I know the fact that setOrientation is a private API.
Is there a solution ?
I found a few examples suggesting Google AJAX APIs.
This link typifies the advice I have found so far: http://briancray.com/2009/05/29/find-web-visitors-location-javascript-google-api/
However, the location is often wrong with the Google APIs.
Other sites seem to know exactly which city I'm in, though, without me entering any information.
Suggestions? Is there something cross-browser (ignoring IE6) and reliable?
I'm new to win32 API programming and I try to understand source code of treeview from codeproject.
But I really don't understand this :
BOOL TreeView::DoNotify(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
// blah blah
HTREEVIEW Selected = (HTREEITEM)SendDlgItemMessage(hWnd,ID_TREE,TVM_GETNEXTITEM,TVGN_CARET,(LPARAM)Selected);
// halb halb
}
It doesn't work ( Selected is used without initializing) until I declare Selected as global variable.
Thanks for reading this and I need your help .
In the iPhone OS4 SDK, does anyone have a suggestion for how I would implement a repeating local notification that ends on a particular date?
Looking at the API documentation, there doesn't appear to be a built-in property of UILocalNotification to allow you to set an end date on a repeat.
Any suggestions would be much appreciated.
Thank you!
I want to Zend_Auth and Zend_Session to save user sessions and logins information
whats the easy and best way for implements following items:
1-Disallow multiple concurrent logins for the specific user
2-List all of all user currently logged in
3-Admin could logout of specific user or destroy specific session
Is there any special ZF or PHP API or library that can do the above?
thanks
Is there an easy way to translate a path with system path variables to an absolute path?
So %ProgramFiles%\Internet Explorer\hmmapi.dll becomes C:\Program Files\Internet Explorer\hmmapi.dll
I like to know if there is an API call that can do this, or do I have to do this the hard way and detect %..% sequences and replace them with the appropriate environment variable?
I am looking for PHP script that will detect face in a uploaded photo and automatically crop it accordingly.
The code should be in pure PHP without depending on any third party API's or Libs.
This code will be a part of our existing code for processing images.
In fact this is the only part that is missing!
I would prefer to have code in PHP version 5.x not PHP 6.x.
Hi,
I'm working on a 3D graphical application in Java using the Java 3D API. I noticed that every time I was dealing with transparency, all I got in return were some clipping problems. Some parts of the scene weren't displayed properly. It might seem obvious that this would happen in a certain way but I'm looking for a logical explanation, why is this happening?
Thank you
I am using PBE encryption to encrypt and decrypt some text on an Android application but I get the BadPaddingException: with the "pad block corrupted" message when I use the wrong private key to decrypt the text.
My question, since I am not well versed with encryption in Java, is if this is the normal behavior of the encryption API, because I need to do some logic in the case when the wrong key is entered, but I do not know the private key, nor do I store it anywhere (storing just the encrypted and decrypted check text).
Thanks,
Mihai
Does anyone know of a good (efficient, nice API, etc.) geometry open source library for .NET? Some of the operations needed:
Data Structures
Vectors (2D and 3D with floats and doubles)
Lines (2D and 3D)
Rectangles / Squares / Cubes / Boxes
Spheres / Circles
N-Sided Polygon
Matrices (floats and doubles)
Algorithms
Intersection calculations
Area / Volume calculations
Dear All,
I've download Windows 7 SDK which was downloaded at the time of the beta release. Now I upgraded to RC and trying with some Direct2D samples. But I can't create the factory pointer using D2D1CreateFactory API. It's always returns NULL. Even the samples downloaded from MSDN is also not working well.
There are some changes from Beta - RC
Is this because of the version mismatch of SDK?
Well the title says it all -
couldn't find that info using DiskArbitration or FSGetVolumeInfo/GetVolumeParms...
I know that hdiutil uses a private framework called DiskImages framework, but I wouldn't want to run an external utility each time I want this info... wheres the API for this ?
Thanks.