pnp's Q&A profile
Visual C# Index was out of range?
I really hate to bother anyone with this seemingly simple question but it appears I am at the dead end. I got this message this morning: Index was out of range. Must be .... Parameter name: startIndex . There are three problem with it. Number one: I have almost debugged this massive application and it seems everything has been working for some time. Unless somehow the input stream's format changed which remains to be checked I do not know where to look. Second, there is no pointer as to where in the source code it happens. And thirdly, I checked and rechecked and I swear I do not have any variable of parameter named startIndex in the entire project. On top of that this error message does not seem to impede the performance. F ...Show All
.NET Development NotSupportedException System.Drawing.Bitmap
I have a VB.Net program which is running on CF MobilePC 2003. In the form creation logic (generated by VS), the creation of a bitmap on the form (in a PictureBox) gets the following exception: Me .pbStop.Image = CType (resources.GetObject( "pbStop.Image" ), System.Drawing.Image) System.NotSupportedException was unhandled Message="System.Drawing.Bitmap" StackTrace: at System.Resources.ResourceReader.LoadObjectV2() at System.Resources.ResourceReader.LoadObject() at System.Resources.RuntimeResourceSet.GetObject() at System.Resources.ResourceManager.GetObject() at System.Resources.ResourceManager.GetObject() at FoxFetchRT.frmPick.InitializeComponent() ...Show All
Visual C++ Warning 2 warning C4995: 'ConstructElements': name was marked as #pragma deprecated
Warning 2 warning C4995: 'ConstructElements': name was marked as #pragma deprecated d:classarr.h 53 the code is as follow: public: template<class TYPE, class ARG_TYPE> class CClassArray { ................... ................... void ConstructElements(TYPE* pElements, int nCount); ................... } void CClassArray<TYPE, ARG_TYPE>::ConstructElements(TYPE* pElements, int nCount) { // first do bit-wise zero initialization memset((void*)pElements, 0, nCount * sizeof(TYPE)); // then call the constructor(s) for (; nCount--; pElements++) ::new((void*)pElements) TYPE; } I only give a few code. Because ConstructElements function was declared deprecated, but I do not use the orignal defintion of this f ...Show All
.NET Development Generate a class at runtime and use it
Hi All Is it possible to create/declare a new class (not an instance) at runtime I would like to load from xml tha wanted class name and the wanted properties and to generate the needed class. of course, then I would like to use it in the project. Thanks Avi You can use CodeDom NameSpace to perform this task. or Microsoft.CSharp. CSharpCodeProvider NameSpace. Where you can dynamically generate a Class file. Compile the class file and then use in your same app. ...Show All
Visual C++ error: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
I got a sample code from MSDN ( http://msdn2.microsoft.com/en-us/library/aa382363.aspx ) I generate a Win32 console application project in VisualStudio 2005 and copy the code into my main.cpp. But when I compiled it, I got the following errors: 1>Compiling... 1>main.cpp 1>.\main.cpp(55) : error C2664: 'CertOpenSystemStoreW' : cannot convert parameter 2 from 'char [256]' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>.\main.cpp(103) : error C2664: 'CertGetNameStringW' : cannot convert parameter 5 from 'char [256]' to 'LPWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style ...Show All
Audio and Video Development Getting a VC-1 file ready for advanced content authoring
Hi all, I just started to author advanced hddvd content but i vailed in getting a valid video content to test my first project. is it possible to multiplex a VC-1 file with the Sonic authoring system for standard HD content in a way that i can use it for my first advanced content project I tried to import the vc-1 file into sonic, generated a simple autostart HDDVD, multiplexed it and used the HVDVD_TS folder for my advanced content project but it didn't work. The Nero Showtime softwareplayer diplayed the menu correctly but didn't play the video. I also tried to burn a dvd rom and inserted it into my Thosiba HD_DVD player but it just displayed the disc error 0x4095C501. Can anybody help me thx mikeret ...Show All
Software Development for Windows Vista Problem in RC1 - bug with High DPI and PPI value
I found unpleasant bug that still exists even in latest Windows Vista RC1. We call SetProcessDPIAware because we want to manually support High DPI mode. In this mode (as earlier in Windows XP) I retrieve PPI value as Microsoft recommends: HDC screen = GetDC(0); scaleX = GetDeviceCaps(screen, LOGPIXELSX) / 96.0; scaleY = GetDeviceCaps(screen, LOGPIXELSY) / 96.0; ReleaseDC(0, screen); But in Windows Vista RC1 it allows return 96, instead of 120 as I set in display properties. I found unpleasant bug that still exists even in latest Windows Vista RC1. We call SetProcessDPIAware because we want to manually support High DPI mode. In this mode (as earlier in Windows XP) I retrieve PPI value as Microsoft recommends: ...Show All
Visual Studio Express Editions VB Express 2005
Where can I find info explaining how to connect to an existing Access Database. The only stuff I have found so far is for connecting to SQL Express 2005. Use the oledb namespace and check your connection string at www.connectionstrings.com Although most of the samples ( http://msdn2.microsoft.com/en-us/vbasic/ms789075.aspx#data ) deal with sql server...the principle of working with a data store is the same....just use the appropriate data namespace (oledb for Access) ...Show All
Visual Studio Installation hangs
I have tried installing VC express on my machine and the installation hangs during startup(loading installation components), with the suite integration toolkit. the report gives the module name as vsscenario.dll. It is a system thing as it has installed Ok on another machine. I have uninstalled all instances of .net and dont have any versions of Visual studio installed. The machine is a 650Mhz pentium 3 with 384 Meg Ram, running XP with service pack2 and should be able to run the program. I am also unable to install from the net as it does the same thing. Hi I found the source of my problem and fixed it. This error occurred cause my Win XP sp2 was a beta version: 5.1.2600.2055 ...Show All
SQL Server SQL Server 2005 hotFix 2153 won't install
I am trying to install sql2005-kb918222-x86-enu.exe, first one in the x86 family. I am getting "This machine does not have a product that matches this installation package". I have SP1 is installed. Version and patch level are 9.1.2047. on HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\Setup Any help is appreciated I have Intel Pentium M processor X86 family_6_Model. I had installed x86 SQL Server 2005 installation packages. But SP1 had failed on Client Components. ...Show All
.NET Development wsdl complextype dictionary definition?
I have a soap webservice with a function that accepts and returns a dictionary parameter. That means that I don't know exactly upfront which elements are in the dictionary and what there names are. Does anyone know how to make a WSDL complextype definition for this situation I already tries something with the AnyAttribute, but that don't get me much further. Any suggestion with links to examples or hints would be appreciated!! Wessel de Vries The Netherlands ...Show All
.NET Development 64bit Office Interop ...
Hi all I have some trouble with Office (Excel) Interop integration ... I have a x64 Windows Server System. I have some applications and they are written in C# 2005 and some of them use excel Interop. The applications wont run the Interop.Excel Code on this system. Error message: Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80040154. I guess I need a 64bit Interop.Excel.dll. Am I right If yes, where do I find it Thanks for any comments! Best regards Frank Uray What version of Excel are you trying to compile your app against Following are the excel dll versions (the versions can be seen the project->properties->re ...Show All
Visual Studio Questions about Sandcastle
I have some questions and observations regarding the July CTP of Sandcastle when using it to generate documentation. The generated CHM file doesn't seem to have an index. There's no Index tab displayed in the viewer. The generated CHM file doesn't seem to have search capability. There's no Search tab displayed in the viewer. When the CHM file is double-clicked to open it for viewing, the right-hand pane of the viewer shows a mostly-blank page with a small warning icon in the upper left-hand corner. This mostly-blank page goes away when any of the entries in the table-of-contents in the left pane are clicked. In the CHM file, the documentation entries for class constructors always seem to have ".ctor" prepended to them. The table ...Show All
Software Development for Windows Vista How do Microsoft want Vista developers to report suspected OS bugs?
I am developing some heavy stuff on x64 Vista Ultimate, do Microsoft care about bugs or suspected bugs that I encounter if so please tell me HOW to do this. Regards Hugh On Connect or with the Microsoft Beta Client . ...Show All
SQL Server Environment Variable in Configuration
Hi, How to use environment variables with Xml Configuration. How It works I want to configure connection string for source and destination Thanks ...Show All
