zariusan's Q&A profile
Visual Studio 2008 (Pre-release) Overide default Namespace for a datacontract
Hi, I am using the IRequestChannel to send and receive messages to/from a WCF webservice. My problem is that when I create a message and send it using the IRequestChannel.Request method the namespace that is used to serialize/deserialize the message body object is http://schemas.datacontract.org/2004/07/Clr.Namespace whereas the namespace used by the server is of a different format. I tried using the ContractNamespaceAttribute to overide the default namespace of my assembly but that didnt work (Since IRequestChannel is not defined in my assembly). Is there some way for me to get around this namespace problem Firdosh You can define the body of your message as a [DataContract] class, and use t ...Show All
Visual C++ Ambiguity of Common Interface in two COM component when generating RCW by VS2005
My situation is described as below: 1. Define an interface in "CommonInterface.idl": interface Interface1 : IUnknown { [, helpstring("method Add")] HRESULT Add([in] int a1, [in] int a2, [out] int *sum); }; Compile it to generate corresponding .h, _i.c, _i.p files; (I do not know how to compile a sole .idl file, so I create a ATL project, write the definition of interface in .idl flieand compile it) 2. Create two COM component by ATL project, both use the Interface1: "SampleCOM1.idl": library SampleCOM1Lib { import "CommonInterface.idl"; // import idl file defined Interface1 importlib("stdole2.tlb"); [ uuid(EBBD4C25-4C46-4355-B0DA-586945ACD464), helpstring("Sample1 ...Show All
Visual Studio Tools for Office Cypress Outlook 2007 addin installation problems
I have some addins for Outlook 2007 developed using Cypress and both VB.NET and C#. If I run the addins from the VS 2005 IDE they run with no problems. If I compile as release mode they run from the IDE, start Outlook and run with no problems. However, if I install after compiling the setup project and try to run the addin by just starting Outlook (on the same dev machine) the addins won't run and the error is the ever helpful: "Not loaded. A runtime error occurred during the loading of the COM Add-in" In cases like this do I need to follow the deployment steps outlined in http://msdn.microsoft.com/office/default.aspx pull=/library/en-us/odc_vsto2005_ta/html/officevstowindowsinstallerwalkthrough.asp Or sho ...Show All
Visual C++ Extracting a random number in (0,1]
Hi everyone! How can I extract a random number between 0 and 1 (0 excluded) in c++ Thanks! I assume you want real values: float randomFloat = 1.0 / ( float )(rand() + 1); ...Show All
Visual C# Where is the web site templates ?
how can i get or load the web site templates back when i open a new Website .(File->New->WebSite ) there wasn't any web site template in "New Web Site" window . just standart c# templates . IIS was loaded . What is the problem Note: I also try "denenv /installvstemplates" ...Not working... Create a blank solution. Right click on the created solution (or an existing one), one of the options is Add. The next drop down has New Website or Existing Web site which will give you options for web services as well... This threw me for a loop for awhile myself. ...Show All
Visual C# Passing a reference to a value type from c# to c++
I am calling a native C method from a C++/CLR DLL. This method takes a float* as an output parameter. Upon return from this method back to my C# method that called it, my x an y variables remain unchanged. Here is the native C declaration: void HC_Get_Location( float *x, float *y); How would I declare the method wrapper in C++ so I can call it from C# hi., you can use out keyword or ref keyword. example private void test( out int i, ref int j) hope it works, soemoe ...Show All
SQL Server Good design?
Hi! I want to add "inheritance" to my database. I have of table X witch attributes a1, a2, a3, a4, a5, a6 and second table Y with attributes a1, a2, a3, a7. I want to create additional table Z with attributes 1a, a2, a3, key and tables X: key, a4, a5, a6 and table Y: key, a7. I have more of those sub-class. Set of common attributes is about 5-10. Additional attributes range from 1 to 20 per table. We have also large dynamics of our database. Often (1 per month) we have to add about 2-5 attributes to some subclass (or remove some attributes). It's good idea for "attributes inheritance" I know those disadvantages: to insert (update, delete) record from X, I have to insert record to Z and X I fou ...Show All
SQL Server Formatting numbers question
I have a datagrid with currency amounts, the default currency format "C" shows only two decimal places, I would like to show up to 4 decimal places. Useing the formula/expression editor, how would this be done Both of the above are possible options. rs12345 - put "c4" into the Format property of the textbox guyinkalamazoo2 - apply the formatting directly tot he value in the expression of the textbox ...Show All
Visual Studio 2008 (Pre-release) Button look
Hi. . I'm using the May 2006 CTP of EiD. My objective is to create a button which has its looks totally different from the usual rectangle. I'd like to give it a custom shape of my choice, which I have drawn in Acrylic. I understand the relations between a control template and styles etc... but what I dont know is where exactly can i draw the structure for my button in EiD. If not, how exactly can I link up a resource dictionary (containing a graphic button object) from Acrylic I have tried adding resource dictionary by editing my Button Style.. but the shape is nowhere to be seen. in fact, i dont even see a button now. somebody please help. this is reaaly urgent. Thanx! < dj > PS: I tried reading up a thread on this forum, called &q ...Show All
SQL Server How do I create a Integration Services project programatically???
hi everyone, My vb .net app creates programatically a package. I mean, you can provide name, description, number of OLEDB/ADO connections, variables and so on, where it's stored, from a WinForm. Up to the moment, process only creates boxes separately wihtout links. My concern is after this successful cycle I only can open that DTSX and see its components but executing button is disabled (only possible with DTEXECUI.exe) from BIDS. Only when I create a project (DTSPROJ) and then I put that same .DTSX inside I am be able to execute it. Well, up to here all of this is very good. Things were created this way for some reason. My question now is how do I from my application in order to create dt ...Show All
Visual C# Using Calendar.SelectedDate to update Gridview
Hi, I'm fairly new to C# and Visual Studio, so any help is much appreciated. I am attempting to create a webpage with two webzones, one containing a Calendar object and the other containing a Gridview which is (currently) linked to an Access database. I have a "Created" date field in the Gridview and I would like to filter the Gridview to show only rows in which the "Created" date equals the Calendar.SelectedDate. I've added the SQLDataSource to the page and configured the Data Source in many different ways with no success. The SELECT statement that I thought should have worked is: SELECT Created, Event, Personnel_Contacted, Remedy_Num, Created_By FROM tblOpsLog WHERE Created = wpCalendar.SelectedDate (th ...Show All
Windows Live Developer Forums class=VE_PlaceList_Title
Could someone please tell me what this is and why it has reared it's ugly head on the map when calling map.GetRoute(start, end, null , null , onGotRoute); Sorry about the confusion in the thread. Your post was helpful. What I ended up doing was locating the DIV id and then setting that div element to display:none. There is another child DIV element inside that DIV which holds an A element which is loaded with an onclick event that holds the coordinates that need to be fired to complete the driving directions. What I want to do is fire the onclick event automatically without the user having to click on the link. That should take care of the problem. Thanks ...Show All
Visual Basic if statements using an empty variable?
curious how to do an if statement like the following : dim variable as string if variable = null then do something else do something else end if the variable will be populated by a combobox and if nothing is selected in that combo box it remains as nothing just an empty variable and I want to be able to execute certian code if a variable is selected and execute different code if nothing is selected. Anyways how would I go about this, am I on the right track with my if statement no thats awsome, I probably owuld have figured it out if I hadn't already been staring at code for the last 8 hours, I think my brain is starting to shutdown so thank you very much that solved my problem perfectly ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Best Way to Ensure 30 fps Frame Rate
Hi. I wrote this in another thread I just started : I am trying to play RGB video at 30 fps, so I set the Direct3D device's FullScreen_RefreshRateInHz = D3DPRESENT_RATE_DEFAULT (which is 60 for most monitors) and set PresentationInterval = D3DPRESENT_INTERVAL_TWO. When reading this, I just realized that if the monitor's frame rate is not 60, then my application will not output the video at 30 fps. How do I ensure the 30 fps frame rate Thanks, Celios Celios, I assume you mean you are concerned that users have monitors with other refresh rates. That is a valid concern. I assume you would be worried about monitors that have refresh rates set > 60 Hz (as there are not too many that would fall bel ...Show All
Audio and Video Development Problems with XBOX 360 HD DVD Player
I continue to run into issues with the xbox 360 hd dvd player every time I insert an hd concert dvd. I do not have any issues with the hd movies but have had issues with every concert inserted. Does anyone know of a solution I've selected Dolby digital. Think I might try a different USB cable... It seems to me that there is a signal loss between the HD DVD and the console. (I know this is isn't a support forum, but was hoping there could be a software "tweak" to fix it.) Thanks. ...Show All
