|
|
If this is the wrong category for my problem, please direct me to the correct place to post my question.
Recently, I have been unable to build any of my C++ projects in Visual Studio .NET 2003 The error is always of the form:
fatal error C1083: Cannot open source file: '.\hello.cpp': No such file or directory
I received the same error when I created a brand new c++ project (empty project, Win32 Console) of Hello World!
#include "stdafx.h"
#include "iostream.h"
using namespace std;
void main()
{
cout << "Hello World!";
}
I have found the following information: http://msdn.microsoft.com/en-us/library/et4zwx34%28VS.80%29.aspx but I don't know how to check and correct all the possibilities
- My include environment variable is set to "c:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\include"
- It does not make a difference to use the syntax: #include <stdafx.h>
I was previously able to write and compile programs without a problem, is there a setting that has been changed somehow?
Appreciate any ideas/suggestions; thanks for your time.
|
|
|
|
|
You'r looking for the Visual C++ forum. This has nothing to do with the .NET Framework.
|
|
|
|
|
Hello All,
I want to be able to distribute an excel workbook to customers, but don't want people to have access to the excel workbook's macros and two of it's sheets. We don't trust the password protection provided by excel (you can buy one of many applications on the web that claim to be able to crack it).
What I think we need is to encapsulate the excel file into a .Net application that provides a basic excel viewer (i.e. the application comprises of a title bar and the excel sheet). Our customer will be able to enter data onto the sheet and click a button that calls the macros (that update the sheet).
Is this solution possible? Can anyone think of a better solution?
Unfortunately moving the functionality out of an excel workbook completely is not an option.
Thank you for your help!
Don
|
|
|
|
|
Member 3199304 wrote: Can anyone think of a better solution?
Yes I can.
Member 3199304 wrote: Unfortunately moving the functionality out of an excel workbook completely is not an option.
Well that rules out a better solution then doesn't it.
So to sum up, you must use Excel but you don't want the user to use Excel. Hmmm who came up with this plan?
Anyway I suppose you are left with discovering whatever features they put in Excel that might allow you to fit that square peg in your round hole.
|
|
|
|
|
My God! What helpful answer - thank you, your the best! (I though I'd join in on your sarcasm
Anyway, unfortunately I'm stuck with the said problem; I need to provide a mechanism to prevent access to the excel file. I was hoping .Net had some sort of GUI component for interacting with Excel files. I have tried searching the web, but haven't had any luck.
For those who have some constructive suggestions, I would be grateful for your help.
Cheers,
Don
|
|
|
|
|
Member 3199304 wrote: I was hoping .Net had some sort of GUI component for interacting with Excel files.
Yes, see that doesn't exist therefore this part of my comment was constructive:
led mike wrote: I suppose you are left with discovering whatever features they put in Excel
Although I see how my sarcasm might have disguised the helpful aspect of it. Also you have not mentioned knowing about the Microsoft provided Primary Interop Assemblies[^] for Office products. These will allow you to easily access existing Excel features that can help with your requirements.
|
|
|
|
|
How about you embed your excel sheet as a Resource into your .Net/C# executable. Then on startup, you extract your embedded resource and create a new spreadsheet on the User harddisk that is an exact representation of you embedded resource - minus all of the password sensitive data. Then you can delete your embedded resource?
|
|
|
|
|
Hi
I have a project which uses DirectSound. I use C#.NET and VS 2005 under Windows XP(x86). Everything is OK, but when I tried the exe file under Windows Vista(x86), it crashed during initialization. I installed VS 2005 + SP1 + Patch for Vista to debug the project, but since that I have not had any problems with my project. It starts, plays sounds and everything is fine now.
So, my question is: where is the problem under Vista? I can't tell other people to install VS to use my application. There might be a patch or something like that but I can't find such a solution. So, help me to solve this problem, please!
Best Regards
|
|
|
|
|
I've never had any problems with DirectSound on Vista.
You really need to debug on Vista to drill down to the problem...
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Likewise - my job is developing audio software, and I'm currently working happily on Vista. (Well, I say happily, but it is Vista... )
Are you (OP) trying to run the .exe you build on the XP machine on a Vista box? I'm not sure if that will work, or if you'll have to build a Vista version.
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
FWIW....
The OS the binaries are built on makes no difference.
The binaries should run fine on Vista unless the OP specifically used
something only supported on XP, in which case (s)he's not doing proper
error/exception handling (which is probably the case anyway, unless it's
just a case of the required .NET framework not being installed )
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: unless it's
just a case of the required .NET framework not being installed
Aside from the fact that your post broke the CP SPCTL (Single Post Critical Thinking Limit) somewhere in the second sentence...
Maybe the power cord isn't plugged in. 
|
|
|
|
|
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: The OS the binaries are built on makes no difference.
Yeah, I kind of sort of vaguely kind of knew that. Binaries aren't really binaries these days anyway.
We're developing mostly on Vista, but we'll be deploying on XP and Mono (and no doubt Win 7 as well). I tend not to worry about all that sort of strategic stuff though, and just get on with my bit of it.
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
molesworth wrote: Binaries aren't really binaries these days anyway.
Heh - maybe I should have put "binaries" in quotes
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
you say that the application crashed on launch? Silly question, but was the correct .Net Framework already installed on the vista machine? or what about the DircetSound libraries?
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Hi, guys
I solved my problem. It all was my mistake... The problem was just an exception thrown by CaptureBuffer constructor because the current machine hadn't got a microphone plugged in.
Thank you for your replies!
Bye
|
|
|
|
|
I have a custom type, FooNode, defined in my C# code. I want to add an instance of that custom type to the global System.Windows.Forms.Clipboard, and then retrieve it from the clipboard again. The add seems to work, but I am not able to retrieve the instance. Upon retrieval, several exceptions print to standard output like the following:
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in System.Windows.Forms.dll
(... and 9 more just like above)
The result of the retrieval is a null reference. There is no crash or halt. The above exceptions are being dealt with internally; I am not able to catch them. The problem is not with the DataObject itself, because I can retrieve my FooNode from it. I just can't retreive my FooNode from the clipboard's DataObject.
I am able to add and then retreive other types of objects to the system clipboard, such as strings and System.Guid. Why can I not retrieve an object of my custom type?
Following is my test code. Call FooTest.Test() to run.
using System;
using System.Diagnostics;
using System.Windows.Forms;
public class FooNode
{
private Guid m_Guid;
private string m_Name = String.Empty;
public FooNode( )
{
m_Guid = Guid.NewGuid();
m_Name = "Foo";
}
public Guid Guid
{
get { return m_Guid; }
set { m_Guid = value; }
}
public string Name
{
get { return m_Name; }
set { m_Name = value; }
}
}
public class FooTest
{
public static void Test( )
{
FooNode fooNode = new FooNode();
DataObject dob = new DataObject( fooNode );
dob.SetData( typeof( Guid ), fooNode.Guid );
dob.SetData( DataFormats.StringFormat, fooNode.Guid.ToString() );
Clipboard.SetDataObject( dob );
object raw = Clipboard.GetDataObject().GetData( typeof( FooNode ) );
Spam( Clipboard.GetDataObject(), new Type[] { typeof( FooNode ), typeof( Guid ) } );
}
public static void Spam( IDataObject dob, Type[] types )
{
Debug.WriteLine( dob );
Debug.Indent();
Debug.WriteLine( "Data formats:" );
Debug.Indent();
string[] formatNames = dob.GetFormats( true );
foreach ( string name in formatNames )
{
Debug.WriteLine( name );
}
Debug.Unindent();
foreach ( string name in formatNames )
{
if ( dob.GetDataPresent( name ) )
{
Debug.WriteLine( String.Format( "Present as format=\"{0}\"", name ) );
Debug.Indent();
object raw = dob.GetData( name );
Debug.WriteLine( String.Format( "raw={0}", raw != null ? raw : "null" ) );
Debug.Unindent();
}
}
if ( types != null )
{
foreach ( Type type in types )
{
if ( dob.GetDataPresent( type ) )
{
Debug.WriteLine( String.Format( "Present as type={0}", type ) );
Debug.Indent();
object raw = dob.GetData( type );
Debug.WriteLine( String.Format( "raw={0}", raw != null ? raw : "null" ) );
Debug.Unindent();
}
}
}
Debug.Unindent();
}
}
modified on Monday, May 18, 2009 8:21 PM
|
|
|
|
|
Hi,
I'm no expert in this matter, but I doubt your object makes it to the Clipboard. I have a hunch you need a [Serializable] for your FooNode class. Also you may want to add ",true" to Clipboard.SetDataObject() to make your object survive your app.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Awesome!
Decorating my FooNode class with the SerializableAttribute got it working.
Thank you.
[Serializable]
public class FooNode
{
...
}
|
|
|
|
|
you're welcome.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Hi,
i have to encrypt the feed of Audio video stream which is live, And for that i have to encrypt it through ASP.NET. I have already the IP of Feed and that feed to be display at player after encrypting it.
so please i need help of you or any website related this.
|
|
|
|
|
Member 1855496 wrote: And for that i have to encrypt it through ASP.NET
No you don't. ASP.NET doesn't do that. The server that's creating the video stream has to support doing that. If not, you're going to need to find a new stream server that does. Also, the player on the client side is going to have to support playing an encrypted stream. You might want to test that before you throw it into production...
|
|
|
|
|
Thanks Dave for reply, but i have to need some idea or concept for go through this encryption of stream . you had written that some player have this facility for encryption can i know which player it is.
|
|
|
|