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

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

D3DImage maximum instances

Posted By:      Posted Date: October 18, 2010    Points: 0   Category :WPF

Recently I've been doing a lot of experiments using D3DImage. I implemented buffered video playback in WPF through DirectShow using a custom allocator in renderless mode. I always render +-100 frames ahead of the current position of the video to be displayed. (.NET 3.5 Windows 7 64bit)

Nonbuffered playback was implemented before and works perfectly.

My first attempt was to store every one of these buffered frames in a D3DImage, backed by a fixed assigned Direct3D Surface. When a buffered frame was no longer needed, the D3DImage was reused to render a new frame. This implementation worked. Calling the sequence of Lock(), AddDirtyRect() and Unlock() to update the D3DImage however didn't seem to work properly at all times. Black frames occurred, or the D3DImage still contained the previously used frame. Let's say +- 4 out of 100 frame displays were erronous.

As mentioned in http://msdn.microsoft.com/en-us/library/cc656910.aspx: "As the number of D3DImage instances increases, more flushing occurs, and performance degrades. Therefore, you should use D3DImage sparingly."

This made me assume I was instantiating too much D3DImag

View Complete Post

More Related Resource Links

Multiple Instances of User Control


I have a user control that I place on a page severl times.  When I make a selection on a ddl in one one control the SelectedIndexChanged event fires for all the control on the page for that ddl.  So I get duplication of an insert that I do.  Is there a way to make sure these events are isolated so this doesn't happen.


'Value' should be between 'minimum' and 'maximum'.


I'm attempting to invoke with parameters:


Dim thing2 As New mydelsubPBStep(AddressOf pbStep)

Me.Invoke(thing2, "setMax", dt.Rows.Count)      <---- this is where the error occurs


the delegate looks like this:

Private Delegate

Maximum memory for string ? . System.MemoryOutOfException Occurs when reading the Content of the fil



I have a C++ code which reads a file [vtk file - its similar to text file only]. and try to store it in string.

here's the code:

String^ ParallelProjectionRenderer::GetVolumeDataAsString(String^ FileName)

    vtkSmartPointer<vtkDataSetWriter> sWriter = vtkSmartPointer<vtkDataSetWriter>::New();

    String^ FileName = "D:\\Users\\...";

    char * sptName = static_cast<char *>(Marshal::StringToHGlobalAnsi(FileName).ToPointer());







    String^ result= File::ReadAllText(FileName);   [it breaks here with system.memoryoutofexception when the file size is huge]

    return result;


this code executes fine when the file size is less than 8mb.

I wanted to know whats the maximum memory allocated to the string.

As a workaround i skipped reading out in C++ code. and i tried to read the file contents in asp.net C# code and stor

The statement terminated. The maximum recursion 100 has been exhausted before statement completion.


Hi All

I have the below sql scripts that give me the error:
"The statement terminated. The maximum recursion 100 has been exhausted before statement completion."

Ive tried using OPTION ( MAXRECURSION 0 ) or 1000 but it still  give me the same error.

WITH cte as (SELECT     ticketid, setstatus, setdate, row_number() OVER (partition BY (ticketid)
ORDER BY setdate ASC) AS rn
FROM         [OneForm].[dbo].[TFAM_SLA_Times]
SELECT     TicketID, 'Submitted', SubmittedON, 0
FROM         [OneForm].[dbo].vw_TFAM_ALL)
    SELECT     a.ticketid, SUM(OneForm.dbo.[CalcMinutesSLA_TFAM](a.setdate, b.setdate)) AS SLA_in_Min
     FROM         vw_TFAM_SLA_Combined AS a LEFT JOIN
                            vw_TFAM_SLA_Combined AS b ON a.ticketid = b.ticketid AND a.rn = b.rn - 1
     WHERE     (a.SetStatus = 'Submitted' OR
                            a.SetStatus = 'Acknowledged' OR
                            a.SetStatus = 'Pending')
     GROUP BY a.TicketID

If i remove the call to the function [CalcMinutesSLA_TFAM] or the b.rn - 1 it works fine.

Here is the code for the function:

CREATE FUNCTION [dbo].[CalcMinutesSLA2

The file reached the maximum download limit. Check that the full text of the document can be meaning



I'm facing an issue with the indexing.

I have 1 WFE+Index server+DB server.

Index server is not installed with MS FIlter pack 1.0

When crawling, the there will be document with warning in crawl log:
The file reached the maximum download limit. Check that the full text of the document can be meaningfully crawled.

Documents that with warning are such as doc, ppt, xls, docs, ppts and many others.
However, I view into the successful crawled document, there are doucments with ext doc and ppt.

For large file index, there are MaxGrowthFactor + MaxDownLoadSize required to be added into the index server.

As my understanding is, MS Filter Pack should installed into index server(already did, correct me if i'm wrong).

I looked into the Office SharePoint Seach(CA>Services in farm), if the server is appointed to "Use this server as indexing server", then MS Filter Pack is suppose to be installed into that particular server as well.

At the bottom, there also has another option is "Use all web front end for crawling".

The question here is, IF the option "Use all web front end for crawling" is selected.
Does the WED FRONT END Server required to installed the Ms Filte

How to run multiple instances of workflow



I've created simple sequential workflow. It's only creates one task and is waiting in while loop until task is Approved. It works fine when I run only one instance of this workflow, but if I start another instance before first one is finished it gets stack and doesn't complete task an workflow stays in In Progress state forever.

Windows UDP Socket Buffer (Maximum)

I am receiving on a socket (C#) and setting the UDP buffer size to br 10 Mb - and creating 16 such sockets. But I see missed UDP packets (they have  a unique seq number in them). When I read back "ReceiveBufferSize" it return the size I set it to - 10Mb.   My question is - what is the maximum internal socket buffer size allowed by Windows (Win Server 2008) ?   Wierdly when I also start Netmon in the background on the receiving machine - I do not see any missed packets.   Does Netmon modify internal windows socket buffers (increase them) - how can I go about doing this with my app ?   Thanks

Network failure in Cluster Environment,will it stop the SQL Server Instances?

Hi All I have problem with cluster Environment that is there is network failure in Cluster Environment,will it stop SQL Server Instances Event viewrer Information 6:22:09 The MSSQLSERVER service entered the stopped state. 6:22:05 The MSSQLSERVER service was successfully sent a stop control. 6:22:04 The SQLSERVERAGENT service entered the stopped state. 6:21:43 The node lost communication with cluster node 'MSSQL0002' on network 'LAN'. 6:22:02 The SQLSERVERAGENT service was successfully sent a stop control. 6:22:02 Cluster resource 'SQL IP Address1(SQLCLUSTER)' in Resource Group 'SQL' failed. 6:22:02 The TCP/IP interface for Cluster IP Address 'Cluster IP Address' has failed. 6:22:02 The TCP/IP interface for Cluster IP Address 'Cluster IP Address' has failed. 6:22:02 The TCP/IP interface for Cluster IP Address 'MSDTC IP address' has failed. 6:22:02 The TCP/IP interface for Cluster IP Address 'MSDTC IP address' has failed. 6:22:02 The TCP/IP interface for Cluster IP Address 'SQL IP Address1(SQLCLUSTER)' has failed. 6:21:58 The TCP/IP interface for Cluster IP Address 'SQL IP Address1(SQLCLUSTER)' has failed. 6:21:58 Cluster network 'LAN' is operational (up). All available server cluster nodes attached to the network can communicate using it. 6:21:58 The interface for cluster node 'MSSQL0002' on network 'LAN' failed. If the condition persist

Detect other versions of SQL Server, or SQL server instances on a computer

Hi All, I want to detect other versions of SQL Server, or SQL server instances on a computer. I used the recommended Microsoft C# example by using the SQL Server Windows® Management Instrumentation (WMI) provider. http://msdn.microsoft.com/he-il/library/dd981032(en-us,SQL.100).aspx SQL server 2005 has been correctly identified on my PC with Windows 7 64 bit OS. Then I uninstalled the SQLserver and all its tools/components. But even after uninstall the utility detects the SQL server 2005 as if it was not removed. What is an alternative for the correct detection of the SQL server installed on PC? Thanks in advance Dmitry

problem on Page_PreRender with RangeValidator control and programmatically setting Maximum and Minim

I am new to the ASP.NET /C# dev. I run into a weird bug when using the RangeValidator Control inside a Formview. I have my DateTime field with validator and it work fine until I submit the page, it actually insert the row into the database but then when the page reload I get the following exception.Server Error in '/Budget' Application. The value '' of the MaximumValue property of 'RV_AjoutUtilisateurDate' cannot be converted to type 'Date'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Web.HttpException: The value '' of the MaximumValue property of 'RV_AjoutUtilisateurDate' cannot be converted to type 'Date'. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [HttpException (0x80004005): The value '' of the MaximumValue property of 'RV_AjoutUtilisateurDate' cannot be converted to type 'Date'.] System.Web.UI.WebControls.RangeValidator.ValidateValues() +1077011 System.Web.UI.WebControls.RangeValidator.ControlPropertiesValid() +12

governing service instances?

We have a WCF service that uses a third party component.  The third party component has strict concurrent licensing security built in and will throw errors if you attempt to concurrently process more than your license will allow.  My question is how to configure our WCF Service to only allow up to a maximum number of service instances at any given time and thus stay under our third party control licensed limit?   (Note, running net.tcp under IIS7/WAS with 16 CPU cores)    thanks    

Clearing WF instances?

Hi, I have been creating lot of WF instances, and now im running of memory after running the program for 15 min or so. Is there any way to clean up the resources in Workflow Application Completed method?

Temp DB occupies maximum space

I am having issues with temp db space, which grows very large every week, I heard shrinking temp db is not a good idea to do, which I am doing it now temporarily to shrink the space, can someone help me how to troubleshoot not to increase the temp db space, I am using #temp tables, cursors, unions and indexes on some of the temp tables in sp's, does it make any difference if i drop the temp tables and indexes after the proc ran successfully?.

How to get in which shift the maximum of time the employee falls?

DECLARE @CheckInTime AS TABLE(EmpID INT, InTime DATETIME, OutTime DATETIME) INSERT INTO @CheckInTime SELECT 1, '1900-01-01 00:50:00.000', '1900-01-01 08:50:00.000' UNION ALL SELECT 2, '1900-01-01 09:45:00.000', '1900-01-01 14:45:00.000' UNION ALL SELECT 3, '1900-01-01 14:20:00.000', '1900-01-01 22:45:00.000' UNION ALL SELECT 4, '1900-01-01 08:30:00.000', '1900-01-01 06:45:00.000' --SELECT * FROM @CheckInTime DECLARE @ShiftMaster AS TABLE([ShiftID] [int], [Name] [varchar](50) NOT NULL, [StartTime] [datetime] NOT NULL, [EndTime] [datetime] NOT NULL) INSERT INTO @ShiftMaster SELECT 1, 'G', '1900-01-01 09:30:00.000', '1900-01-01 22:00:00.000' UNION ALL SELECT 7, 'F', '1900-01-01 00:00:00.000', '1900-01-01 08:00:00.000' UNION ALL SELECT 8, 'S', '1900-01-01 08:00:00.000', '1900-01-01 16:00:00.000' UNION ALL SELECT 9, 'T', '1900-01-01 16:00:00.000', '1900-01-01 23:59:00.000' There is no relationship between @ShiftMaster and @CheckInTime. Here emp 1 should comes in F shift. He also falls in S shift. But he works more than F shift when compared to S shift Here emp 2 should comes in G shift Here emp 3 should comes in T shift (because he works more time in T shift) Here emp 4 should comes in S shift I wants to get (ShiftID) in which shift he works for more time. Thanks, Babu Kumarasamy.

Different SQL Server instances on one server

Good afternoon. I have a Windows Server 2003 with SP2 loaded. On it I have SQL Server 2000 - 8.00.760 SP3 Developer Edition along with SQL Server 2005 - 9.00.1399.06 RTM Developer Edition. Can I also install an instance of SQL Server 2008 on this server without cauing a problem with the otherSQL instances? Thank you.

Maximum Number of Processor Cores in CLR

Is the maximum number of processors (cores) supported by different versions of the CLR documented somewhere?  I'm working on an application hang problem and I can see in dumps that a thread is waiting in mscorwks!ThreadpoolMgr::RecycleMemory for a flag whose address was calculated by using the processor number as an index.  I can't see the index in the dump, but the machine has 48 processors and it looks as though the array containing the flags can accomodate only 32 processors, so the thread might be waiting on something beyond the array. Another clue is that there are only 32 GC threads, so I'm suspicious that this CLR will only scale to 32 cores. The CLR in use is the 32-bit version of 2.0 running on 64-bit Windows 2008 SP2.  I'd like to see whether there is a restriction on the number of processors in that version and, if so, whether there is another version that would support more.

The maximum string content length quota (8192) has been exceeded while reading XML data.

Hi, I have been working on implementing a WCF service and have run into this problem with the maxStringContentLength.  I have read a bunch of posts here on how to correct it and none of them have worked.  I have updated my web.config in my local IIS5 published service to be maxStringContentLength="2147483647" and have updated my application's app.config to be maxStringContentLength="2147483647".  I delete all DLL's, rebuild, restart IIS, make sure all VS 2008 virtual webs are stopped, republish multiple times...even reboot my machine and I continually receive the following error message:The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/qlStatement. The InnerException message was 'There was an error deserializing the object of type System.String. The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 171, position 35.'.  Please see InnerException for more details.I am running the service on my local machine: Win XP SP2, IIS5, .Net 3.5, VS 2008Here is my WCF service's servicemodel section of the web.config:    <system.serviceModel>    <bindings>      <wsHt
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