Tuesday, September 09, 2008

IE internet browsing problem in Windows Mobile

IE internet browsing problem in Windows Mobile:

---------------------------------------------------------------------

1.Even though I configured the proxy server and USB setting as Turbo Mode.

I am not able to open any web pages in a mobile.

Solution:

----------

I have opened Active Sync's connection Settings in PC and selected the automatic from the list of options in combo box.

The computer is connected to:

Automatic

Work Network

Internet

it was "Work Network" previously. I modified it to the "Automatic" in a PC then the web pages are able to open in IE.

Monday, September 08, 2008

WinCE Deployment error Deployment and/or registration failed with error

WinCE Deployment error:

------------------------------------------

Deployment and/or registration failed with error: 0x8973190e. Error writing file '\Program Files\VideoRenderer.dll'. Error 0x80450001: (null)

========== Build: 0 succeeded, 0 failed, 3 up-to-date, 0 skipped ==========

========== Deploy: 2 succeeded, 1 failed, 0 skipped ==========

This is due to I have deployed the DLL in Windows folder But the mobile is not allowing to deploy...

So I prepared the cab ( will have the DLL) and install it in mobile.

But it is also not working...

  The problem is Bulverde device shown error as the Problem occurred in tmarshaller.exe file.

Reason:

----------------

Previously I got the same error when Codec DLL is missing in the Codec Filter.

if I deployed it, then I got the error...

 

I have opened the file

using fopen() fn in Constructor of a video renderer... It causes the problem.

if I opened the file in SetMediaType() fn I didnt get any errors...

So Beware of Fopen() calls...

 

 

I have declared the public variable in CVideoRenderer and opened the fopen("\\My Documents\\test.log"); in the CVideoRenderer's constructor...

CVideoRenderer's constructor will be called in the CreateInstance of IUnknown implementation of a filter...

 

This is the General problem to any COM DLL.

Tuesday, September 02, 2008

How to configure the VS 2005 wizard to create the .rel file:


How to configure the VS 2005 wizard to create the .rel file:
----------------------------------------------------------------------------------------
Projects-> Properties->Linker ->CommandLine

 /subsystem:windowsce,5.01 /machine:THUMB /savebaserelocations:"$(TargetDir)$(TargetName).rel"

Monday, September 01, 2008

The difference between SmartPhone and Pocket PC?



---------- Forwarded message ----------
From: sundar rajan <sundararajan.svks@gmail.com>
Date: Sep 1, 2008 4:19 PM
Subject: Re: Anyone knows the difference between SmartPhone and Pocket PC?
To: ootaboys@googlegroups.com



 Windows mobile is a general term for Windows OS that are used in handheld devices.

For Example Windows OS is a general term... Under this category we are having different flavors like Windows 98,windows XP,

Windows NT and so on.
 

Windows Mobile  operating system for handhelds:


 1.Pocket PC Edition
 2.Pocket PC Phone Edition, and
 3.Smartphone Edition

Pocket PC Edition:
--------------------
 Stand-alone PDAs, such as the Dell Axim X51 series and the HP iPaq rx1950, use Pocket PC Edition and come with the

full Mobile Office suite, including Word Mobile, Excel Mobile,and PowerPoint Mobile. These handhelds typically have

240x320-pixel touch screens, can feature wireless connectivity, and are best for those who want a palm-size device to

organize vital information with the option to work on the go and surf the Web.
 ( it is like a handheld PC )

Pocket PC Phone Edition:
------------------------
 Devices that run Pocket PC Phone Edition are similar to Pocket PC PDAs in shape and size (including the touch-screen

functionality), with the full suite of office apps, but they add cellular-wireless capabilities so that you can make phone

calls. These all-in-one mobiles are good for power users who need the full functionality of being able to work and stay

connected on the road. Examples of Pocket PC phones are the Palm Treo 700w.

SmartPhone:
-------------
 Windows Mobile  Smartphone Edition offers the biggest difference of the three versions. First, the mobiles are

smaller, resembling cell phones, and they generally feature 320x240-pixel displays that aren't touch sensitive. Instead, you

navigate via soft keys and a joystick. Also, while you get all the calendar and contact tools, you don't get the entire

Office Mobile suite, just Outlook Mobile; third-party apps, such as Westtek's ClearVue Suite, are available so that you can

view work documents. These types of smart phones are perfect for users who want the phone form factor but also want to stay

up-to-date and be more productive on the road.

 

Major Difference between Smartphone  and Pocket PC:

 SmartPhone is a low cost solution compare to Pocket PC.

Touch screen facility available in Pocket PC.Smartphone will not have touch screen facility.we have to navigate via softkeys or joystick.

 That is it...

 
 

 

 

Thursday, August 28, 2008

fatal error LNK1181: cannot open input file

Linker Error
--------------
MS_LINK : fatal error LNK1181: cannot open input file '..\..\..\..\..\3gpstack\pd_streaming_lib\prj\lib_ppc2003_evc4\windows mobile 5.0 smartphone sdk (armv4i)\debug\etm_pd_stack_lib_ppc2003_evc4.lib'

Solution:
----------
The path of the library file "etm_pd_stack_lib_ppc2003_evc4.lib'" is too large.
It is less than the 255 characters but still it is the problem. if I copied my project directly to D:\ then I will not get any errors.
MSDN KB for LNK1181 Error:
--------------------------------------
SYMPTOMS
When you build a Microsoft Visual C++ .NET project in Microsoft Visual Studio .NET or a Microsoft Visual C++ 2005 project in Microsoft Visual Studio 2005, you may receive an error message that is similar to the following error message:
fatal error LNK1181: cannot open inputfile ‘f:\temp\test.obj’
Back to the top
CAUSE
This problem may occur when the path of the Intermediate file folder or the path of the Output file folder in the Visual C++ project starts with a leading backward slash (\). The IDE uses the drive from where it is launched. The IDE does not use the drive that the project uses.
Back to the top
WORKAROUND
To work around this problem, include the drive name for the Intermediate file folder and for the Output file folder. To edit the entries for the IntDir folder or for the OutDir folder, follow these steps:1. On the Project menu, click Properties Pages.
2. In the Properties Pages dialog box, click Configuration Properties.
3. In the General list, type new entries for the Output Directory items and for the Intermediate Directory items that include the drive names.

reference: http://support.microsoft.com/kb/839286

Friday, August 22, 2008

How to connect the Windows Pocket PC(Not having SIM) to the Internet thru ActiveSync

How to connect the Windows Pocket PC(Not having SIM) to the Internet thru ActiveSync:
------------------------------------------------------------------------------------
Two ways to connect our Development mobile to internet;
1.Thru the ActiveSync connected System
2.Thru the LAN settings

Development mobile will not have any SIM card in it;


Thru Active Sync Connected System:
-----------------------------------------------------------
To Select this mode we have to keep in mind the following things:
1.we must configure the Proxy server to the IE settings
2.USB Setting must be Turbo Mode;
How to Configure it:
----------------------------
Select Settings->Connections->connections->Tasks-> Set up Proxy server
general tab
Enter the name for the Settings: "Internet"
Proxy settings Tab:
-------------------------------
Enable the check boxes
1.this network connects to the internet option and
2.This network uses a proxy server to connect to the internet and enter the Proxy server address.
ProxyServer: 10.202.202.20
and click on OK.
Settings->Connections->connections has two tabs...
1.Tasks
2.Advanced
In the Advanced tab, click on "Select Networks" button.
Network Management page will appears.it has two combo boxes.
Select the "Internet" (description given in General Settings ) in both the combo boxes.
and then click on OK.

Moreover we have to set the "USB setting" mode as Turbo Mode;
Select the following option button:
Settings->connections->USB setting-> ActiveSync(Turbo Mode)

Restart the device to make the new Active Sync connection.
Now check the Internet explorer with URL.

LAN Based internet connection:
------------------------------------------------
Thru LAN based connection, we can access the LAN ( Intranet websites also) sites.


To Select this mode we have to keep in mind the following things:
1.we must configure the Proxy server to the IE settings
2.USB Setting must be Turbo Mode;
How to Configure it:
------------------------------
Select Settings->Connections->connections->Tasks-> Set up Proxy server or Edit my proxy server
general tab
Enter the name for the Settings: "Internet"
Proxy settings Tab:
-------------------------------------
Uncheck the following check boxes
1.this network connects to the internet option and
2.This network uses a proxy server to connect to the internet and enter the Proxy server address.
ProxyServer: 10.202.202.20
and click on OK.
Settings->Connections->connections has two tabs...
1.Tasks
2.Advanced
In the Advanced tab, click on "Select Networks" button.
Network Management page will appears.it has two combo boxes.
Select the "Internet" (description given in General Settings ) in both the combo boxes.
and then click on OK.

Moreover we have to set the "USB setting" mode as Normal Mode;
Select the following option button:
Settings->connections->USB setting-> ActiveSync(NormalTurbo

Restart the device to make the new Active Sync connection.
Now check the Internet explorer with URL.

Wednesday, August 06, 2008

Is it possible to call the function available in .obj code?

Is it possible to call the function available in .obj code?
Solution:
===========
yes.
But We can use it only in C file;In C++, we need further information;
I have developed the DLL project;
Within c file, We are able to call the function in obj code;
So within that DLL project, I have added the following
int ScaleRGB(int Width,int Height); available in object code;

Header.c:
--------
void ScaleRGB_Wrapper(int Width,int height)
{
ScaleRGB(width,height);
}
we have to add the .obj file to our DLL project;
within C code , call this ScaleRGB() fn and export the ScaleRGB_Wrapper() fn
as follows:
TESTDLL_API void ScaleRGB_Wrapper(int Width,int height)
{
ScaleRGB(width,height);
}
From the DLL client C++ application, call the ScaleRGB_Wrapper() function in a DLL;

Monday, August 04, 2008

Debug Mode and Release mode differences

Debug Mode and Release mode differences:
------------------------------------------------
Always test the application in both debug and release mode as a habit;

In debug mode, many of the compiler optimizations are turned off which allow the generated executable match up with the code. This allows breakpoints to be set accurately and allows a programmer to step through the code one line at a time. Debugging information is also generated help the debugger figure out where it is in the source code.
In release mode, most of the compiler's optimizations are turned on. Chunks of your code could be completely deleted, removed, or rewritten. The resulting executable will most likely not match up with your written code. However, normally release mode will run faster then debug mode due to the optimizations.

The biggest difference between these is that: In a debug build the complete symbolic debug information is emitted to help while debugging applications and also the code optimization is not taken into account. While in release build the symbolic debug info is not emitted and the code execution is optimized.Also, because the symbolic info is not emitted in a release build, the size of the final executable is lesser than a debug executable.
Note:
--------
One can expect to see funny errors in release builds due to compiler optimizations or differences in memory layout or initialization. These are ususally referred to as Release - Only bugs :)In terms of execution speed, a release executable will execute faster for sure, but not always will this different be significant.
Q:Why does program work in debug mode, but fail in release mode?A: First of all, there is no such thing as 'debug mode' or 'release mode'. The VC++ IDE offers the possibility to define configurations which include a set of project settings (like compiler / linker options, output directories etc.) When a project is created using AppWizard, you get two default configurations: "Win32 Debug" and "Win32 Release". These are just convenient starter configurations with several preset options which are suitable for typical debug builds or release builds respectively, but you are by no means restricted to those settings. Actually, you can modify those configurations, delete them, or create new ones. Now let's see what the two default configurations typically include and what distinguishes them:Win32 Debug:Subdirectory 'Debug' used for temporary and output filesPreprocessor symbol _DEBUG definedDebug version of the runtime libraries is usedAll compiler optimizations turned offGenerate debug infoWin32 Release:Subdirectory 'Release' used for temporary and output filesPreprocessor symbol NDEBUG definedRelease version of the runtime libraries is usedVarious compiler optimizations turned onGenerate no debug infoThere are a few other differences, but these are the most important ones. Now, what's the first implication of all this? That, as opposed to a common misunderstanding, you can debug a release build. Just go to 'Project -> Settings', choose the Win32 Release configuration, tab 'C/C++', 'General' and set 'Debug Info' to 'Program Database'. Then go to the tab 'Linker', and turn on 'Generate Debug Info'. If you rebuild your project now, you will be able to run it in the debugger. Regardless of whether your program crashes or just doesn't behave as expected, running it in the debugger will show you why. Note however, that due to optimizations turned on in the release build, the instruction pointer will sometimes be off by a few code lines, or even skip lines altogether (as the optimizer didn't generate code for them). This shouldn't be a concern, if it is, turn off optimizations.When debugging your release build this way, you will probably discover that at a certain point during execution, a variable has a different value in the release and in the debug build, causing the differing behaviour. And if you go back and see where the value of that variable is set, you will most probably find out that it isn't: You simply forgot to initialize that variable. The reason why the debug build seemed to work is that the debug version of the runtime library initializes dynamic memory and stack variables to known values (in order to track down memory allocation and overwrite errors), while the release version of the runtime library doesn't. This is by far the most frequent single cause for different behaviour between debug and release builds, so chances are good that this fixes your problem (and for the future, remember to always initialize your variables).If uninitialized variables were not the cause of your problem, let's look at the next possible difference between debug and release builds: The preprocessor symbols _DEBUG and NDEBUG. If you have any code inside an #ifdef _DEBUG / #endif block, it will not be contained in a release build. What's worse, the dependency of those symbols can be hidden inside other macros. A typical candidate for this is ASSERT: It expands to the assertion testing code if _DEBUG is defined, and to nothing if it is not. Therefore, be careful to have no code with side effects inside an ASSERT macro. For example, the following code will work in a debug build, but fail in a release build:CSomeDialog dlg;ASSERT(dlg.Create(IDD_SOME_DLG));dlg.ShowWindow(SW_SHOW);As a rule, never put code which needs to be executed inside an ASSERT. (A side note: Conditions which can be expected to fail at runtime, like the 'Create()' call in the example, should never be tested with ASSERTs anyway. Assertions are a tool to assert pre- and postconditions regarding your code, not runtime error conditions.)At this point, you have most probably found out why your code failed in the release build. If not, this might be one of the very rare cases where the compiler optimizations caused your code to behave differently (the VC++ compiler had several optimizer bugs in the past, and I doubt they have all been fixed). To exclude this, first turn all the optimizations off (Project -> Settings, tab 'C/C++', category 'Optimizations', option 'Disable (Debug)'). If your code works now, selectively turn optimization options on until you found the culprit. Simply leave it turned off, or upgrade to a newer version of the compiler (or install the most recent service packs) which might hopefully fix that bug.This should help you get your release build running in most of the situations. For a more in-depth discussion about the differences between debug and release builds, see the excellent article Surviving the Release Version
http://www.codeproject.com/KB/debug/survivereleasever.aspx
Incorrectly prototyped message handlers !Thats another big goof up everyone makes atleast once ...In the debug build, if you have incorrect message handler signatures this doesnt cause any problems.But MFC does a couple of naughty type casts in the message map macros. So when you build the same code in release mode, you are guranteed to run into trouble. As soon as your message handler returns, your stack frame gets trashed and you get a neat little GPF.
Some References:
http://www.codeproject.com/KB/debug/survivereleasever.aspx
http://www.codeproject.com/KB/debug/releasemode.aspx

Local variable value changed only in release mode not in debug mode

I faced the problem like the following:
Local variable values are changed after the particular moment;The expected value is not placed in a variable;
Even though we are not changing the value;I faced this problem many times;But thought of it as a multi threading error;
Nature of Error:
---------------
This error is occured only in release mode not in debug mode;
and I have used the more local variables in a function;
Fix:
-------
I fixed the problem after calling the certain function the local variable value is changed;
void Test()
{
//variables ...
//....
//...
int i = 0;

i = 2;
InnerFn();
printf( i); // i value is around 158004
//Unknown reason
}
Solution:
--------------
it is not a multi threading error; Mostly the multi threading error affects only the global variables and class private or public members not a local variables;For Every Thread call, the stack variable is allocated and freed;
Problem is there is some memory leak in InnerFn() ; So it affects the local variables of a Test() fn;
After modified the memory leak problem in InnerFn(), the local variable value is not changed;the local variable have the expected value;

How to replace our video renderer with Microsoft's video renderer?

if we are developing our own renderer, then we have to make the media player to use our own
video renderer filter. what we have to do for it?
[HKEY_CLASSES_ROOT\CLSID\{70e102b0-5556-11ce-97c0-00aa0055595a}]
@="Video Renderer"
"Merit"=dword: 0x800000
and check its merit ;

Make our own Video Renderer filter's merit as follows
0x800000 + 1
Then Windows media player make use of our own video renderer filter;
Dshow loads filters based on merit; if the merit is high, then it will be preferred by the windows media player as well .
as Intelligent connect for connecting filters in a filtergraph.

Tuesday, July 29, 2008

Application Crashing Problem in Release version in VC++ with Map File

Application Crashing Problem in Release version in VC++:
-------------------------------------------------------------------------


Crash is as follows:

Data Abort: Thread=8dac8ba4 Proc=8037c870 'TestApp.exe'
AKY=ffffffff PC=78a3e118(image_proc.dll+0x0001e118) RA=00013178(StreamingPlayer.exe+0x00003178) BVA=241dc35e FSR=00000807

Data Abort: Thread=8d89dc34 Proc=8037c870 'TestApp.exe'

AKY=ffffffff PC=78a3e118(image_proc.dll+0x0001e118) RA=00013178(StreamingPlayer.exe+0x00003178) BVA=241dc35e FSR=00000807

Unhandled exception at 0x78a3e118 in TestApp.exe: 0xC0000005: Access violation writing location 0x001dc35e.

Data Abort: Thread=8d739000 Proc=8037c960 'wmplayer.exe'

AKY=ffffffff PC=7894e118(imageLib.dll+0x0001e118) RA=00013178(wmplayer.exe+0x00003178) BVA=260ec35e FSR=00000807








if we are building our application in release version, at client side it crashed with some address;
How can we trace which function is failed and locate where the error is ?


1.Solution for the above thing is to make use of .map file


.map file content sample:
---------------------------
imageLib
Timestamp is 488496e7 (Mon Jul 21 19:32:15 2008)
Preferred load address is 10000000


Start Length Name Class
0001:00000000 000004bcH gTest CODE
0002:00000000 00000e30H Addition CODE

Address Publics by Value Rva+Base Lib:Object

0000:00000000 ___safe_se_handler_table 00000000
0000:00000000 ___safe_se_handler_count 00000000
0001:00000000 RGB565toYUV420 10001000 ColorConversion.obj
0002:00000000 UYVYtoRGB565 10002000 ColorConversion.obj
0002:000003d4 Rotate 100023d4 ImageOps.obj
0002:00000660 Blur 10002660 ImageOps.obj


Static symbols

0010:0000417c Init 1001517c f InitOps.obj






Crash will throw some address which caused the problem;




There are two types of crash;Crash may be in executables or may be in DLLs;



Solution for Crash in Executable Application:
------------------------------------------

Example:
---------
AKY=ffffffff PC=7894e118(TestApp.exe 0x1001e118) Data abort

if it is executables, the Solution is as follows:


0x1001e118 - is a Crash Address;


Function Address = Crash Address - Preferred Load Address in Map file - 0x1000 ( For Portable Executable File Format Infos) ;


Solution for Crash in DLL:
-----------------------------


AKY=ffffffff PC=7894e118(imageLib.dll+0x0002478) RA=00013178(wmplayer.exe+0x00003178)


ImageLib.dll + 0x0001e118 means

Crash Address = Preferred Load address in Map File + Crash Address;
= 10000000 + 2478
= 10002478 This Crash Address is in between Rotate and Blur Function;
So the crash is in Rotate function;





Preferred load address is 10000000
0002:000003d4 Rotate 100023d4 ImageOps.obj
0002:00000660 Blur 10002660 ImageOps.obj


Note:
--------
100023d4 - Starting Address of the Rotate() fn
( Rotate fn code occupies memory range from 100023d4 to 1000265F )
10002660 - Starting Address of the Blur() fn



Creation of a Map File in Vs2005:
--------------------------------------------------

At the time of building the project, if we specified this macro

/MAP[:file name] will leads to create the map file ;




/MAP (Generate Mapfile)


/MAP[:filename]
Remarks
where:

filename
A user-specified name for the mapfile. It replaces the default name.

Remarks
The /MAP option tells the linker to create a mapfile.

By default, the linker names the mapfile with the base name of the program and the extension .map. The optional filename allows you to override the default name for a mapfile.

A mapfile is a text file that contains the following information about the program being linked:

The module name, which is the base name of the file

The timestamp from the program file header (not from the file system)

A list of groups in the program, with each group's start address (as section:offset), length, group name, and class

A list of public symbols, with each address (as section:offset), symbol name, flat address, and .obj file where the symbol is defined

The entry point (as section:offset)

The /MAPINFO option specifies additional information to be included in the mapfile.

To set this linker option in the Visual Studio development environment
Open the project's Property Pages dialog box. For details, see Setting Visual C++ Project Properties.

Click the Linker folder.

Click the Debug property page.

Modify the Generate Map File property

Application Crashing Problem in Release version in VC++ with Map File

Application Crashing Problem in Release version in VC++:
-------------------------------------------------------------------------


Crash is as follows:

Data Abort: Thread=8dac8ba4 Proc=8037c870 'TestApp.exe'
AKY=ffffffff PC=78a3e118(image_proc.dll+0x0001e118) RA=00013178(StreamingPlayer.exe+0x00003178) BVA=241dc35e FSR=00000807

Data Abort: Thread=8d89dc34 Proc=8037c870 'TestApp.exe'

AKY=ffffffff PC=78a3e118(image_proc.dll+0x0001e118) RA=00013178(StreamingPlayer.exe+0x00003178) BVA=241dc35e FSR=00000807

Unhandled exception at 0x78a3e118 in TestApp.exe: 0xC0000005: Access violation writing location 0x001dc35e.

Data Abort: Thread=8d739000 Proc=8037c960 'wmplayer.exe'

AKY=ffffffff PC=7894e118(imageLib.dll+0x0001e118) RA=00013178(wmplayer.exe+0x00003178) BVA=260ec35e FSR=00000807








if we are building our application in release version, at client side it crashed with some address;
How can we trace which function is failed and locate where the error is ?


1.Solution for the above thing is to make use of .map file


.map file content sample:
---------------------------
imageLib
Timestamp is 488496e7 (Mon Jul 21 19:32:15 2008)
Preferred load address is 10000000


Start Length Name Class
0001:00000000 000004bcH gTest CODE
0002:00000000 00000e30H Addition CODE

Address Publics by Value Rva+Base Lib:Object

0000:00000000 ___safe_se_handler_table 00000000
0000:00000000 ___safe_se_handler_count 00000000
0001:00000000 RGB565toYUV420 10001000 ColorConversion.obj
0002:00000000 UYVYtoRGB565 10002000 ColorConversion.obj
0002:000003d4 Rotate 100023d4 ImageOps.obj
0002:00000660 Blur 10002660 ImageOps.obj


Static symbols

0010:0000417c Init 1001517c f InitOps.obj






Crash will throw some address which caused the problem;




There are two types of crash;Crash may be in executables or may be in DLLs;



Solution for Crash in Executable Application:
------------------------------------------

Example:
---------
AKY=ffffffff PC=7894e118(TestApp.exe 0x1001e118) Data abort

if it is executables, the Solution is as follows:


0x1001e118 - is a Crash Address;


Function Address = Crash Address - Preferred Load Address in Map file - 0x1000 ( For Portable Executable File Format Infos) ;


Solution for Crash in DLL:
-----------------------------


AKY=ffffffff PC=7894e118(imageLib.dll+0x0002478) RA=00013178(wmplayer.exe+0x00003178)


ImageLib.dll + 0x0001e118 means

Crash Address = Preferred Load address in Map File + Crash Address;
= 10000000 + 2478
= 10002478 This Crash Address is in between Rotate and Blur Function;
So the crash is in Rotate function;





Preferred load address is 10000000
0002:000003d4 Rotate 100023d4 ImageOps.obj
0002:00000660 Blur 10002660 ImageOps.obj


Note:
--------
100023d4 - Starting Address of the Rotate() fn
( Rotate fn code occupies memory range from 100023d4 to 1000265F )
10002660 - Starting Address of the Blur() fn



Creation of a Map File in Vs2005:
--------------------------------------------------

At the time of building the project, if we specified this macro

/MAP[:file name] will leads to create the map file ;




/MAP (Generate Mapfile)


/MAP[:filename]
Remarks
where:

filename
A user-specified name for the mapfile. It replaces the default name.

Remarks
The /MAP option tells the linker to create a mapfile.

By default, the linker names the mapfile with the base name of the program and the extension .map. The optional filename allows you to override the default name for a mapfile.

A mapfile is a text file that contains the following information about the program being linked:

The module name, which is the base name of the file

The timestamp from the program file header (not from the file system)

A list of groups in the program, with each group's start address (as section:offset), length, group name, and class

A list of public symbols, with each address (as section:offset), symbol name, flat address, and .obj file where the symbol is defined

The entry point (as section:offset)

The /MAPINFO option specifies additional information to be included in the mapfile.

To set this linker option in the Visual Studio development environment
Open the project's Property Pages dialog box. For details, see Setting Visual C++ Project Properties.

Click the Linker folder.

Click the Debug property page.

Modify the Generate Map File property


For More Info:
http://www.codeproject.com/KB/debug/mapfile.aspx

Friday, July 25, 2008

Streaming Versus Progressive Download

Streaming Versus Progressive Download :
-------------------------------------------------
There are trade-offs to consider when deciding whether to deliver a movie using progressive download, streaming, or broadcasting.
All QuickTime media types can be delivered as progressive downloads. Streaming is limited to sound, video, and text. Broadcasting is further limited to compression schemes and quality settings compatible with real-time capture and compression.
Progressive download works even when the bandwidth is not sufficient for real-time playback; it simply buffers incoming data and delivers delayed playback. Streaming and broadcasting are bandwidth limited; if the connection is not fast enough, the movie cannot play.
Streaming movies do not store a copy of the movie on the client computer, making them inherently more difficult to copy without the consent of the movie’s owner. This can be an important consideration, and is one reason why people choose streaming over progressive download.
Streams take up a specified amount of bandwidth, whereas HTTP file downloads proceed as quickly as the connection allows. It is therefore easier to manage the bandwidth usage of a streaming server than of a web server delivering progressive-download movies.
Broadcasting allows you to deliver coverage of live events as they happen, or to provide real time "chat" between computers.
To sum up, if your movie includes live coverage, you must use broadcasting. If bandwidth management and copy discouragement are paramount considerations, streaming may be your best choice for stored content. If simplicity, reliability, or quality regardless of connection speed are most important to you, progressive download is probably best.

Ref:
http://developer.apple.com/documentation/QuickTime/RM/Fundamentals/QTOverview/QTOverview_Document/chapter_1000_section_6.html

Thursday, July 24, 2008

How to download you tube video as MP4 file:

How to download you tube video as MP4 file:
-------------------------------------------------------------------
http://www.youtube.com/get_video?video_id=ID&t=SIGNATURE&fmt=18
Download Youtube video:
--------------------------------------
copy the Youtube link
and go to the following URL and give the youtube link in the following site:
"http://vixy.net/rawvideo/"
we will get something like "Right click here to save as mp4 file";
and right click it and open it in a new window;

we will get the URL like above
http://youtube.com/get_video.php?video_id=zskO9O3hF78&t=OEgsToPDskI7pZ1ChBCot9co5DvFysF9&fmt=18
then it will show the file download dialog; and click on save button so that we can save it in local disk;

http://youtube.com/get_video.php?video_id=xoKbDNY0Zwg&t=OEgsToPDskJI-k1mwTeJHOC9_dadX340&fmt=18

Progressive Download Streaming with Quicktime player

Progressive Download Streaming with Quicktime player:
-------------------------------------------------------
1.Install apache
For Progressive Download Streaming, we have to install the Apache server and configured the httpd.conf file's listen 80 as
listen desired_port
listen 8080
put streamable clips in htdocs( default virtual directory of the Apache)
2.Create Streamable clips with Helix mobile producer
Input/Output tab select the input and output file and select the export type and Click on "Export Settings and Meta data" tab and select Export Settings option
as Progressive Download and then select the "Encode" button;
Next thru Quicktime player or Progressive Download Streaming filter, we can do the following;
http://ApacheRunningIP:8080/clip_path
Qt player will play the file;

WMP doesnt load the Source Filter

WMP doesnt load the Source Filter Problem:
------------------------------------------------
if we are giving the URL like this:
http://www.youtube.com/get_video?video_id=AdZC8EAp62c&t=OEgsToPDskL9x6BrV7XCzFzahexhvDdL&fm t=18
then the windows media player is not loaded the PD Stream Source DLL;

Currently the youtube URL is not accessible in my system;So kindly give another Wrong URL and check whether the Windows Media player loads our PD Stream Source Filter;
Eventhough the invalid URL we have given to the Windows media player (http://10.205.3.30:8080/test.3gp), the Windows media player loads the PdStream Source filter;
http://10.203./get_video?video_id=AdZC8EAp62c&t=OEgsToPDskL9x6BrV7XCzFzahexhvDdL&fm

with URL without extension, it is not loading the source filter ( Ex: http://192.168.233:8080/test);
I got parameter incorrect if I am using the http://192.168.233:8080/




Even though we registered the custom file type( http://), Windows media player is not able to load the source filter; ( We already registered the File type and source filter in registry ).
Windows media player is able to load the source filter only for the following URL:
URL WindowsMediaPlayer error
http://192.10.198.2:5050/ Parameter Incorrect
http://192.168.10.3:5050/test SourceFilter for this file can't be loaded
http://192.168.10.3:5050/get_video?video_Id=adAZd& t=susisueie&fmt=18
Source Filter for this file can't be loaded

Source Filter class ID is:
{018778CE-07D8-4656-982E-B5DDB16C71DF}

We have not registered the File Extension type (http://) separately. So the Register Custom File type can be done within the Source Filter;( By addding the registry settings Programmatically);

HKEY_CLASSES_ROOT

Source Filter =
Extensions
<.ext1> =
<.ext2> =

if we have sepcified any extensions, if the URL is having that extension, then only the source filter will be loaded;
Ex:
HKEY_CLASSES_ROOT
http://
Source Filter =
Extensions
.ext1 =".mp3"
.ext2 =".mp4"
http://192.168.3.10:5000/test.mp4
http://192.168.3.10:5000/test.mp3 then only it will loads the Source filter
otherwise it will not loads the Source Filter;

Another way of resgistering the source Filter :
----------------------------------------------
HKCR\http
HKCR\http\extensions\
Key and value is as follows:
.mp4 { Filter CLASS ID}
.mp3 { Filter Class ID}
So whenever it is having URL with extension then only WMP will loads the specified class ID source filter;

Finally I have solved the problem;
Solution:
-------------
we have to add the Source Filter and class ID in the HKCR\http;
So now WMP will loads the Source Filter automatically;

Tuesday, July 15, 2008

Mp4UI tool is an open source file. Many converters are not properly converting the meta data. For Example, If I am converting the video from WMV to MP4 , the meta data available in a WMV is not available in ConvertedMP4 file;

So we can make use of the MP4UI tool to add meta data to the MP4 file;


MP4UI dialog:





Click New/Open button and select MP4 file;




Look at the Lower Right corner, it is having M symbol Just click on this;





After Entering all these information and enable the Part of a compilation check box and Click on OK; it will add the Meta data to the MP4 file;


Using this Metadata, we can know the artist, composer, Singer, Film and so on information about the media file;



Monday, July 14, 2008

Add Meta data to mp4 file thru MP4UI tool

m4a clip meta data problem

m4a clip meta data problem:
-------------------------------------------
we are having two different APIs to read iTune based file format and other 3GP standard file format;
iTune file format is based on Quicktime file format;
They called the m4a file as iTune file format;
M4A,MP4,M4V, MSNV ( MSNV for Sony PSP Video) files are based on the MPEG4 File Format;
MPEG4 File format is based on Quicktime container format;
iTune is also follows Quicktime container format;So quicktime 3GP,MP4 are all based on Quicktime container format;
Even though we rename the files from mp4 to 3GP or 3GP to mp4, the Quicktime displays the video and audio with meta data;
We are having two set of APIs One is to read meta data from Quicktime Meta data(Mp4) and another one is to read meta data from the
3GP file;
Solution:
------------
1.We can call the two APIs Successively to get the meta data information from a file;
2.We can call the Meta data APIs based on file type
( It may not display meta data if we renamed the 3GP file to MP4 file)
3.One more Solution is checking the File format;




Quicktime's iTune,MP4 and 3GP uses the same container format;
Atom:
--------
We can call the meta data APIs based on the file atom;
if the atom is 'ftyp';
Atom Syntax:
--------------
ftyp PreferredBrand MinorVersion CompatibleBrands NULL
Example:
ftyp 3GP4 00 00 02 00( version in Hex) 3Gp4 isom mp41
Compatible brands are
3GP4 isom, mp41;

Preferred Brand:
-----------------
1.4 bytes code ( it may be like 3GP or mp4)
Note:
--------
the Preferred Brand must occur in Compatible Brands list;

3GP standards may have the following
3GP4
3GP5
3GP6
So we will compare the first 3 codes with 3GP, if it is zero


if(_stricmp(code,"3gp") == 0) //Start Code is Equal;
{
}

for MP4 file, it may have mp4,m4v,m4a and isom and so on;
mp41,mp42
so we can make a check like "mp4" with first 3 start codes;
While downloading the MP4 file I faced the problem; its ftyp or Brand code is equal
to 'MSNV' it is not matching to any of the format;MSNV is a sony video PSP recorder format;
Quicktime will do the following to check the file format;

ftyp 3GP4 00 00 02 00( version in Hex) 3Gp4 isom mp41


Quicktime will enumerates the compatible Brands;
Quicktime will checks whether the file is according to the 3GP4 Spec,if it is not, then it will checks
the file format is in isom and if the file format is not in a format of Isom, then Quicktime will check with the
mp41 format; if it is the correct format, then according to the file format,Quicktime will read data from the
file; if media file is not matched with any of the compatible brands, then it will throw "Invalid file format specification"
error;

Thursday, July 10, 2008

Return values in function argument Pointers

Pointers Sample application:
----------------------------------------
int Function( char* arr)
{
strcpy(arr,"sun");
return 0;
}

void Main()
{
char arr[3];
Function(arr);
printf("\n %s",arr);
}
Expected Output : sun
Actual Result : I got some invalid junk data;


So I modified the main()fn call as follows:

void Main()
{
char arr[3];
Function(&arr[0]);
printf("\n %s",arr);
}
the Output is : sun