Start a new topic

Difficulty using CDB API after installation

Original Post by: RickPresley Mon Feb 4 20:46:35 2013


Hi! I'm attempting to learn more about CDB by installing and using the CDB API. After installing the API and creating a simple command line app that attempts to initialize a CDB instance as follows:


// Create an instance of cdbDB and initialize

cdbDB MyCDB;

if (MyCDB.Initialize() == false)

{

std::cout << "Initialization failed." << std::endl;

exit(-1);

}

std::cout << "Initialization completed." << std::endl;


When run in debug mode, initialization fails with the following:


Failed to load plug-in:flt_d.dll

Failed to load plug-in:flt_d.dll

Failed to load plug-in:flt_d.dll


Using procmon, I've verified that flt_d.dll was found and loaded. I also installed the OpenFlight API as well. Any idea why initialization would fail in this way?


I should also state that I built the samples included with the API and they failed in the same manner.


Thanks in advance for any info you can offer!


Original Post by: giada.carlini Wed Feb 13 15:17:55 2013


Hi, I have the same problem after installing the API. Please HELP.

Thanks.

Original Post by: hermann Wed Feb 13 21:00:04 2013


Hi,


Running a quick test with the provided samples got me a similar problem of init failing. If I run the generated executable from the folder, it works for me. In Visual Studio, I was able to fix it by setting the working directory in the project setting to the generated bin folder (debug in this case). CDB API is looking for some XML configuration file in the current folder.


However, I am not getting the same error message of the DLL not loading. So, the issue could also be something else.


Please have a try and let us know if that fixes the issue.


Regards,


Herm

Original Post by: giada.carlini Thu Feb 21 09:35:49 2013


Hi, sorry for the wait.


I have tried many times without success.. than I tried it on another machine, and I had no problems. On my machine I have installed Visual Studio 2005 SP2 and Visual Studio 2010 SP1... I don't know..


Now, I have another question: I would convert raster files that I extract from CDB into .NET Bitmap object. How can I do?


Thanks for your patience.


Regards,


Giada

Original Post by: giada.carlini Thu Feb 21 18:49:45 2013


Hi,

I continue having problem working in debug mode.


Running example project in Debug mode in output window I read:


LDR: LdrpWalkImportDescriptor() failed to probe c:\presagis\cdb_api_1_1\samples\cdb_search\dev\bin\ms80_d\flt_d.dll for its manifest, ntstatus 0xc0150002


Why?


Thanks..

Original Post by: hermann Thu Feb 21 21:37:10 2013


Hi,


The libraries are build in Visual Studio 2005. So, for debug, you must build in VS 2005 (or have it installed) to avoid issues with the side-by-side.


If this is working fine in release mode but not in debug, it is because you have the right VC++ redist package (which is only for release binaries) but not there is something missing in the VS 2005 install (which provides the debug C++ libs). Have you tried to install all security updates.


Maybe the following article would help:


http://blogs.msdn.com/b/junfeng/archive/2006/04/14/576314.aspx


Please provide feedback as we will keep investigating the issue to provide a better answer and get you going.


Regards,


Herm

Original Post by: giada.carlini Fri Feb 22 09:30:45 2013


Hi,

I compared the settings of machine on which Debug works with mine.


I found that in directory "WinSxS" I had two folder for CRT Debug:

- x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c

- x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_5490cd9f


But the following folder was missing:

- x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_d014c028


I think this is the security updates you are talking about.

I have installed it ("VS80sp1-KB971090-X86-INTL.exe") and now it works!!


Now, I have to go back to the main issue on whitch I have to work..


I would convert raster files that I extract from CDB into .NET Bitmap object. I imagine having to copy in some way each rasterChannel.

How can I do?


Thank you very much for the support,


Regards,

Giada

Original Post by: hermann Fri Feb 22 13:38:55 2013


Hi,


Happy to see that the debug build issue has been resolved.


For imagery files (one of the CDB raster file), there are 3 channels, respectively R,G,B.


For each channel, CDB API allows to get a pointer the data buffer and the number of bytes in this buffer, with getData()and getSize().

You can also get the number of pixels in the image with RasterFile::getSize(unsigned int& oWidth, unsigned int& oHeight).


A quick search found this reference on similar bitmap manipulation which may be useful:


http://jieyanghu.com/2010/12/29/manipulating-raw-bitmap-data-in-net/


Regards,


Herm

Login to post a comment