Software Development Network Logo
  • .NET Development
  • VS Express Editions
  • SQL Server
  • Microsoft ISV
  • Visual FoxPro
  • Architecture
  • Visual C#
  • Visual Studio
  • Visual J#
  • Smart Device
  • Game Technologies
  • Windows Vista
  • Windows Live
  • Visual Basic
  • VS Team System

Software Development Network >> Vinod_Saastha's Q&A profile

Vinod_Saastha

Member List

Warren LaFrance
blogster
jif01
anderskj1
njohe
MrShenanigan
kobhan
ahmed_black_horse
Piotr Celej
kline
JamiePe
Alex Dresko (MVP wannabe)
Harry Strand
adaley
SamGB
Sossles
Saeedsad
bllshw
halidecyphon
geoff p
Only Title

Vinod_Saastha's Q&A profile

  • Visual C++ Candidate function(s) not accessible strange case

    When trying to call a __gc class static function in an assembly which has CLR and non-CLR types in its signature, I get a Candidate function(s) not accessible error. In an assembly, using /clr:oldSyntax: TSEShared.h -------------- // TSEShared.h #pragma once #include <string> using namespace System; namespace TSEShared { public __gc class Global { public: static std::string ToCppString(System::String *); }; } TSEShared.cpp ---------------- #include "stdafx.h" #include "TSEShared.h" std::string TSEShared::Global::ToCppString(System::String * str) { if (str == 0) { return(std::string()); } System::In ...Show All

  • Visual C# using ExecCommand to copy in MSHTML

    I am working on an editor using mshtml. I just cannot get cut / copy / paste to work with ExecCommand. All other command identifiers seem to be working well. Here is my code: public partial class Form1 : Form { private static HtmlDocument htmldoc; private bool fireonce = false; // fire previewkeydown only once public Form1( ) { InitializeComponent( ); } private void Form1_Load(object sender, EventArgs e) { webBrowser1.Navigate("about:blank"); webBrowser1.Select( ); } private void webBrowser1_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e) { ...Show All

  • Visual C++ TIME CONVERSION BUG

    // TimeConstructionBug.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "ATLComTime.h"   int _tmain( int argc, _TCHAR* argv[]) { COleDateTime a(2006, 12, 1, 17, 0, 0); SYSTEMTIME b; a.GetAsSystemTime(b); FILETIME c; ::SystemTimeToFileTime(&b, &c); COleDateTime d(c); CString startTime(a.Format()); CString endTime(d.Format()); printf( "StartTime %s, EndTime %s\n" , (LPCTSTR)startTime, (LPCTSTR)endTime); return 0; } I compiled the above C++ code (minimum to show the possible bug) using Visual Studio 2005 as ...Show All

  • Visual Studio Tools for Office ServerDocument.AddCustomization() starts new Word Instance

    Hi, I use VSTO ServerDocument.AddCustomization() method to dynamically customize Word .doc file. However, if I try to customize a fresh (new) Word .DOT file, a new instance of Word is started even if one already exists. This is causing so much pain. Also, this behavior is NOT repeated if the .dot file is already customized and I re-add the customization after removing it first. Here is the code: private void button1_Click(object sender, EventArgs e) { string fileName = @"C:\Documents and Settings\My Documents\Template1.dot"; this.StartWordApp(); this.DoThis(); MessageBox.Show("Annonymous Template Created and cl ...Show All

  • Visual C# Are strings any easier in the new C#?

    I stopped using C# about a year ago. I hated the complexity of using strings. Gone were the days of MyString = "Hello"; I had to now make an object. String manipulation, which was once easy using MID, RTRIM, REPLACE, etc., now is tedious. Anyway, I was wondering if the newest version of C# has made it any easier Um, you couldnt do - string s = "Hello"; what was so hard about - string s1 = s.Trim() string s1 = s.Substring(1,2); Its no different than in VB.Net. Unless you use the non CLR compilant VisualBasic assemblies; no different except that, in vb, dec ...Show All

  • .NET Development System.IO.File.Encrypt do not work

    Hello, I been searching the forum and web and can not find any answere to my question so i am hoping someone can give me a clue to why this simple function do not work for me. Problem i am facing is the function: System.IO.File.Encrypt(path); gives me a exception with -->"inccorect function" i have tryed the following code : System.IO.File.Encrypt("c:\\temp\\TestFile.txt"); System.IO.File.Encrypt(".\\TestFile.txt"); System.IO.File.Encrypt("TestFile.txt"); and i know there file is there :) full code: ------------------------------------ String path = "TestFile1.txt"; using (StreamWriter sw ...Show All

  • SQL Server Forcing Users to log out of SQL 2000

    I am a begginer to SQL. I am truly limited with SQL language. Every month we have to do a month end closing for our company. In order for us to do this we need to get everyone off the database to proceed. This process is horrible and generally takes at least 1/2hr to 45 min. to do so. i am looking for a command that i can use in query analyzer if possible to force the users out of the database. if that isnt an option can you recommend another program in which i can do this. i am at a loss and need some help..... thanks Did you have a look in the BOL for ALTER DATABASE ALTER DATABASE SomeDatabase SET SI ...Show All

  • .NET Development how to concatenate data from two Byte arrays into one Byte array?

    Hello!   Does the .NET framework provide an easy way of merging two  Byte arrays into one boc First a low level one: byte [] one = { 1, 2, 3 }; byte [] two = { 6, 8, 9 }; int length = one.Length + two.Length; byte [] sum = new byte [length]; one.CopyTo(sum,0); two.CopyTo(sum,one.Length); Then a bit better, use the generics List<T> collection byte [] one = { 1, 2, 3 }; byte [] two = { 6, 8, 9 }; List < byte > list1 = new List < byte >(one); List < byte > list2 = new List < byte >(two); list1.AddRange(list2); ...Show All

  • Windows Forms Automated Printer Install

    Hello, was wondering if it's possible to automate printer installs on the print server  Not actually installing printers on users systems, but into the print server itself. My organization has over 50 printers and we're planning a server upgrade. I've taken it upon myself to attempt to create a .Net program that can install all the printers to our print ser ...Show All

  • Software Development for Windows Vista Access violation errors

    Hi.   I'm trying to make a DirectShow app in C++. I'm using Visual Studio 2005 Express, and I don't want to use .NET for various uninteresting reasons. I can get programmes to compile fine, but every time I try to run them it comes up with access violation errors. I feel sure there's something fairly simple and probably fairly obvious I'm doing wrong, but I really don't know where to start figuring out what that thing is. In this example, the violation occurs when I try to call pGrab->SetOneShot( true );. The really strange thing is that calling pGrab->SetOneShot( false ); works perfectly, or appears to (or rather, ...Show All

  • Visual Studio How to work with Framework 1.0 in Studio 2003

    Hi Friends,     I am supposed to work on an application written in framework 1.0. I have VS 2003 installed on my PC with Framework 1.0 as well as 1.1. I wish to work on framework 1.0 with VS 2003. Is it possible to do so or i need ot go for VS 2002 installation. If framework 1.0 with VS 2003 is possible, please share the configuration that needs ot be done. I tried opening project in build 1.0 version in VS 2003 & it asks for upgrading. Please give your valuable suggestion. Thanks Regards, Saurabh application Developer, Wipro Saurabh, Open the project in Visual Studio 2003 and click Project | [Project] Properties ...Show All

  • Smart Device Development CAB Header structure

    Hi! This might be a bit off-topic, but here goes.. I'm currently trying to understand the file structure of a cab built for wm 5.0 devices. This differs from the earlier structures. Does anyone know where or how i could get hold of the struct for the header I have the "common" structure already.. but i want to find where offset to AppName and Provider is stored... For the moment, I'm using a hex editor and trying to find the offset myself, but without luck... Any help would be appreciated :) What do you mean- ' differs from the earlier structures' Are you referring to the _setup.xml file contained within the CAB T ...Show All

  • Visual Studio Team System Baseless merge ?

    I've been told a couple of times to workaround problems with branching via a Baseless Merge.  Now I'm pretty sure I can guess what this does based on the name, but I can't find any way to accomplish this through the VS2005 UI. I've read all the docs I can find and I've searched google and all I've come up with is the command line option to do "h.exe merge /baseless" from MSDN and the reference from Buck's blog. The description in the docs being : /baseless - "Performs a merge in the absence of a basis version" Am I missing something in the UI or is it just not in there yet Excellent. Thanks, Richard ...Show All

  • Visual C# Problem with LRC-Checksum

    Hello, I try to get an LRC-Checksum (XOR of each string) of the following hex 41 30 31 54 30 30 30 30 30 30 30 30 30 30 30 31 30 39 39 34 35 30 30 03  and my result is 05 which seems to be wrong. I calculate it with string GetChecksum( string sentence) { // Loop through all chars to get a checksum //char Character; int Checksum=0; foreach ( char Character in sentence) { // XOR the checksum with this character's value Checksum = Checksum ^ Convert .ToByte(Character); } // Return the checksum formatted as a two-character hexadecimal return Checksum.ToString( "X2" ); } This string will be sent over RS232 to anot ...Show All

  • Visual Studio Express Editions A lot of code on one form when using tab folders. Any solutions?

    Hi, I am using VB.NET 2005. I have a fairly large program and have broken it up into tab folders. I would like each tab to have a seprate form in order to isolate the code associated with each tab. I notice that the way VB.NET uses tabs, all of the code is on one form which makes finding code segments messy. Is there a way to fix this, or do I have to live with it. I am using modules extensively to reduce the amount of code on the form. Any suggestions would be helpful,. Thanks, quicksun Thanks Paul. Between your suggestion and the others, I think I have a roadmap to follow. Thanks for the help. qu ...Show All

©2008 Software Development Network