.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

"Not enough storage is available to process this command" exception on BitmapSource.Create

Posted By:      Posted Date: September 28, 2010    Points: 0   Category :WPF

Hello all,

i've been developing an application that uses Directshow Sample grabber to take snapshots from a video capture and to show it in a WPF control and save it to a local file. I'm using VS2010. Every thing went fine in the development and tests, except when i tried the app in a non-development computer with Windows 7 installed. I caught this exception on application logs:

System.ArgumentException: Not enough storage is available to process this command.  ---> System.Runtime.InteropServices.COMException (0x88982F8C): Excepção de HRESULT: 0x88982F8C
   em System.Windows.Media.Imaging.CachedBitmap.InitFromMemoryPtr(Int32 pixelWidth, Int32 pixelHeight, Double dpiX, Double dpiY, PixelFormat pixelFormat, BitmapPalette palette, IntPtr buffer, Int32 bufferSize, Int32 stride)
   em System.Windows.Media.Imaging.BitmapSource.Create(Int32 pixelWidth, Int32 pixelHeight, Double dpiX, Double dpiY, PixelFormat pixelFormat, BitmapPalette palette, IntPtr buffer, Int32 bufferSize, Int32 stride)

The code that generates this exception follows

byte[] imageBytes = new byt

View Complete Post

More Related Resource Links

How to create a Custom Exception Handler using Micorosft Exception Handling Application Block?

Dear Friends,Can any one let me know "How to create a Custom Exception Handler using Microsoft Exception Handling Application Blocks"I will be having a set of Exceptions which will be getting maintained in an XML File along with the User Friendly Messages for a particular Exception. Whenever an Exception occurs in the projects first it need to check with the Exceptions present in the XML File and need to display the concerned user friendly message for that particular exception to the user..I am not able to get an idea on "How to start with the Microsoft Exception Handler Application Block" to achieve this". Please help me in this regard...Thanks and Regards,G.V.N.Sandeep.

Getting 'Unable to create mutex' exception using IsolatedStorage

Getting the following exception when trying to use IsolatedStorage on a windows 7 machine.  This same code works fine on Windows XP or Vista.  Any insight would be most helpful. Thanks CD Sample method: public static IsolatedStorageFileStream GetIsolatedStorageFileStream(string fileName,FileMode fileMode)         {                          IsolatedStorageFile isolatedStorageFile = IsolatedStorageFile.GetUserStoreForAssembly();                          IsolatedStorageFileStream fileStream;             string existingFile = FindExistingStorageFile(isolatedStorageFile, fileName);             if(!(String.IsNullOrEmpty(existingFile)))             {                 fileStream = new IsolatedStorageFileStream(fileName, fileMode, isolatedStorageFile);             }             else             {                 fileStream = new IsolatedStorageFileStream(fileName, FileMode.Create, isolatedStorageFile);             }             return fileStream;                      } when trying to access the returned stream, I am receiving the following exception. Top Exception Type=System.IO.IsolatedStorage.IsolatedStorageException Source=mscorlib Message=Unable to create mutex. (Exception from HRESULT: 0x80131464) StackTrace: at System.IO.IsolatedStorage.IsolatedStorageFile.nOpen(String infoFile, String syncName) at System.IO.IsolatedStorage.IsolatedStorageFile.Lock() at System.IO.Isolate

calling CreateObject from web service...getting exception: Cannot create ActiveX component


I have created a web service in VB 2005 and this ws calls CreateObject to access an api. I can successfully call CreateObject from an application but not the web service(using the same code). I get the following error:


System.Exception: Cannot create ActiveX component.
   at Microsoft.VisualBasic.Interaction.CreateObject(String ProgId, String ServerName)

   at WebServicePAM.getPositionData.getPamString() in  c:\inetpub\wwwroot\WebServicePAM\App_Code\getPositionData.asmx.vb:line 60


WebServicePAM is the web service.


I appreciate any suggestions. I have gone through the IIS settings and but have not been able to make any changes that will allow me to call CreateObject successfully.




What is the fastest way to create BitmapSource / BitmapImage?


Hi, all

My WPF application calls a 3rd part com which returns pixeldata as byte array and shows an image based on these pixeldata.

Right now what I am doing is Create a System.Drawing.Bitmap object then draw the pixel data into the Bitmap, need to do some process on each pixel, then create a BitmapSource from that Bitmap.

But it is VERY SLOW. I am wondering is there a better approach?

Code snippet:

               //data.Rows - width
               //data.Columns - height
               //data.Pixeldata[] - pixel byte

                 Bitmap bmp = new Bitmap(data.Columns, data.Rows, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
                BitmapData bmpData = bmp.LockBits(new System.Drawing.Rectangle(0, 0, data.Columns, data.Rows),


Every self-respected programmer should include exception handling techniques. Sometimes your application will generate an error. Regardless of who was responsible for this error, the programmer or the user, it is up to the first to include the necessary exception handling techniques to keep his/her program from crashing. The .Net environment provides useful techniques for avoiding disastrous errors such as try-catch statements and user-defined exceptions.

Global Exception Handling with ASP.NET

After your global exception handler has done its work, you'll want to redirect the users of your website to a friendly page that tells them that something has gone wrong, and then provide them with customer support information as well as a link back to your web application's home page.

How to create 3 tier application using LINQ

As you know that in 3 tier architecture there are three layers

User interface layer. (Is our Form in Windows application and .aspx page in Web application)
Data Access layer. (Which provides interface between Business logic layer and Database)
Business Logic layer.(Which stores your application logic)

Create ToolTip for GridView Header

The following allows you to add a tooltip to the header links of your GridView, a feature that is lacking.

Create And Run Excel Macro At Runtime in C#

You've been tasked with writing a Windows Form application using the .NET Framework that interacts with Microsoft Excel. If you are new to working with Excel in .NET and are having trouble learning how to format certain cells or cell ranges, then this little tip will come in handy. Rather than scour the internet hoping to find the correct set of constants or method syntax for formatting your spreadsheet, use the built in tools in Excel to write the familiar VBA code for you. Then, you can paste the VBA code generated by Excel into the sample C# code below and run it dynamically at runtime.

Create and Use a Typed DataSet by Using Visual C# .NET

This article shows you how to create and use a typed DataSet in a small Web application. Typed DataSets, which inherit from the DataSet class, create first-class members of a DataSet's DataTables and DataColumns, yielding the many benefits that come with the use of strong typing.

Connestion string create any database server

This links important to how to create connection string to any data base sever.

SQL Server 2005 Try and Catch Exception Handling

I'm pretty excited to see that there is some real error handling for T-SQL code in SQL Server 2005. It's pretty painful to have your wonderfully architected .NET solution tainted by less-than-VBScript error handling for stored procedures in the database. The big difference being the addition of TRY..CATCH blocks. Let's take a look:

Dynamically Create Controls in ASP.NET by Using Visual C# .NET

This article demonstrates how to dynamically create a control for an .aspx page. The sample project does the following:
Creates two TextBox controls.
Verifies that the contents (TextBox.text) and the attributes of the TextBox are saved across posts to the server.
Illustrates handling events that are posted by a dynamically-created control

Dynamically Create Controls in ASP.NET with Visual Basic .NET

This step-by-step article describes how to dynamically create controls for an ASPX Web page.

The sample project does the following:
It creates two TextBox controls.
It verifies that the TextBox contents (TextBox.text) and attributes are saved across posts to the server.
It describes how events that are posted by a dynamically created control are handled.

How to create a windows mobile (Smart Device) .Cab installer

A Cab file is the default setup format for Windows CE and Windows Mobile devices (similar to windows .msi files). You probably already have installed several application using .cab files, and are familiar with the concept. One point which is often unknown is that .cab files are processed by wceloader.exe, and it can only install one .cab file at a time. That means we cannot have nested .cab files. It doesn't mean we cannot have .cab files contained by another .cab, but the contained .cab files will not be installed during the installation of the container .cab. We should install it manually after the container .cab file installation has been completed.

There are two ways to create a cabinet (.Cab) file. The traditional one, and the friendly VS Smart Device Cab project which doesn't require additional coding, but which also relies on the traditional one at low-level.

Create Web Site vs Web Application


I follow the tutorial and creted a web site for my company sales system. One of my collegue mention we use the wrong templet, we should use Web application for company application.

Should i continue using web site or change to web application? We are creating application for company sales, inventory, hr ,etc where possible more than 1000++ user. And during month end, it will be high traffic and transaction. can Web Site Template with BLL and DAL handle it? or i just need a powerful server?

Create an API (aspx vs mvc)


Hi everybody!

I'm not sure if this is the right place to ask this, so, sorry if it's not. I have to create a web application. I can handle that. But, it has a requirement I've never done before. I need to create an API for that application, so other apps can get or set information from/to my webapp.

I've been searching a lot and still don't have a starting point. Seems that MVC is really good to do that, but I'm not familiar with MVC, so I would need a starting point. I was thinking to do it in aspx (Framework 4), but do not know how to do that with aspx either.

Can anyone help me to get started with this?

Thanks in advance

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend