|
hi;
please tell me how to create a string array
char *p[] do not work;
thanx.
Kanchana
|
|
|
|
|
hmklakmal wrote: please tell me how to create a string array
char *p[] do not work;
array<String^>^ strarr;
Regards,
Nish
-- modified at 11:28 Wednesday 18th January, 2006
|
|
|
|
|
|
toxcct wrote: very intuitive syntax though...
Yeah, it can be a tad confusing initially.
Regards,
Nish
|
|
|
|
|
Dont work that one.
Kanchana
|
|
|
|
|
hmklakmal wrote: Dont work that one.
How exactly does it not work?
Regards,
Nish
|
|
|
|
|
|
Found the problem.
StreamReader ^sr = gcnew StreamReader(File::OpenRead("test.txt"), Encoding::Default);
|
|
|
|
|
Interesting! I'd have thought, that'd have been the default.
Regards,
Nish
|
|
|
|
|
So did i...
I have found this in msdn:
ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.NETDEV.v10.en/passport25/NET_Passport_VBScript_Documentation/Single_Sign_In/Advanced_Single_Sign_In/Localization_and_LCIDs.htm
for slovenian i need to set "windows-1250", but i coudn't find any way to change to this encoding, when i have tried Encoding::Default just for fun. And it worked. I think this encoding chose it self based on windows configuration.
|
|
|
|
|
Saksida
I just went through the source (using Reflector). When you don't specify an encoding, it uses UTF8 by default. Hence your problem. Now that makes sense I guess.
Regards,
Nish
|
|
|
|
|
I can only specificy (the way i know):
UTF7
UTF8
UTF32
Unicode
ASCII
and of course Default.
but my program requires:
windows-1250
How can i set other encoder like windows-1250 without using default?
|
|
|
|
|
Saksida Bojan wrote: but my program requires:
windows-1250
How can i set other encoder like windows-1250 without using default?
You can use Encoding::GetEncoding("windows-1250")
Regards,
Nish
|
|
|
|
|
Thanks for the help.
Do you know where can i get entire list for encoding?
|
|
|
|
|
hi guys;
the IMediaSeeking @ Duration didn't work, any thougth about that?
thanks
|
|
|
|
|
What library are you talking about there?
Regards,
Nish
|
|
|
|
|
#pragma once
using namespace System;
using namespace System::Runtime::InteropServices;
namespace QuartzTypeLib
{
[StructLayout(LayoutKind::Sequential), ComVisible(false)]
public ref class DsOptInt64
{
public:
DsOptInt64( long Value )
{
this->Value = Value;
}
long Value;
};
[Flags, ComVisible(false)]
public enum class SeekingCapabilities // AM_SEEKING_SeekingCapabilities AM_SEEKING_SEEKING_CAPABILITIES
{
CanSeekAbsolute = 0x001,
CanSeekForwards = 0x002,
CanSeekBackwards = 0x004,
CanGetCurrentPos = 0x008,
CanGetStopPos = 0x010,
CanGetDuration = 0x020,
CanPlayBackwards = 0x040,
CanDoSegments = 0x080,
Source = 0x100 // Doesn't pass thru used to count segment ends
};
[Flags, ComVisible(false)]
public enum class SeekingFlags // AM_SEEKING_SeekingFlags AM_SEEKING_SEEKING_FLAGS
{
NoPositioning = 0x00, // No change
AbsolutePositioning = 0x01, // Position is supplied and is absolute
RelativePositioning = 0x02, // Position is supplied and is relative
IncrementalPositioning = 0x03, // (Stop) position relative to current, useful for seeking when paused (use +1)
PositioningBitsMask = 0x03, // Useful mask
SeekToKeyFrame = 0x04, // Just seek to key frame (performance gain)
ReturnTime = 0x08, // Plug the media time equivalents back into the supplied LONGLONGs
Segment = 0x10, // At end just do EC_ENDOFSEGMENT, don't do EndOfStream
NoFlush = 0x20 // Don't flush
};
[ComVisible(true), ComImport,
Guid("36b73880-c2c8-11cf-8b46-00805f6cef60"),
InterfaceType( ComInterfaceType::InterfaceIsIUnknown )]
public interface class IMediaSeeking
{
[PreserveSig]
int GetCapabilities(SeekingCapabilities &pCapabilities );
[PreserveSig]
int CheckCapabilities( [In, Out] SeekingCapabilities &pCapabilities );
[PreserveSig]
int IsFormatSupported( [In] Guid& pFormat );
[PreserveSig]
int QueryPreferredFormat( [Out] Guid& pFormat );
[PreserveSig]
int GetTimeFormat( [Out] Guid& pFormat );
[PreserveSig]
int IsUsingTimeFormat( [In] Guid& pFormat );
[PreserveSig]
int SetTimeFormat( [In] Guid& pFormat );
[PreserveSig]
int GetDuration( long& pDuration );
[PreserveSig]
int GetStopPosition( long& pStop );
[PreserveSig]
int GetCurrentPosition( long &pCurrent );
[PreserveSig]
int ConvertTimeFormat( long& pTarget, [In] Guid& pTargetFormat,
long& Source, [In] Guid& pSourceFormat );
[PreserveSig]
int SetPositions(
[In, Out, MarshalAs(UnmanagedType::LPStruct)] DsOptInt64^ pCurrent,
SeekingFlags dwCurrentFlags,
[In, Out, MarshalAs(UnmanagedType::LPStruct)] DsOptInt64^ pStop,
SeekingFlags dwStopFlags );
[PreserveSig]
int GetPositions( long &pCurrent, long &pStop );
[PreserveSig]
int GetAvailable( long &pEarliest, long &pLatest );
[PreserveSig]
int SetRate( double dRate );
[PreserveSig]
int GetRate( double& pdRate );
[PreserveSig]
int GetPreroll( long &pllPreroll );
};
}
|
|
|
|
|
Are you trying to use CCW on the Quartz library (I assume it's a COM library). And if so, in what way is it not working? You said Duration failed - do you mean that a call to GetDuration failed?
If the error is more on the COM side, you might have to repost this question in the COM forum.
Regards,
Nish
|
|
|
|
|
After having such a piss-poor time with VS2005 destroying WinForms whenever I alter resX files, I gave up on it and put string literals directly in code. Now that I'm going back and doing cleanup, I want to remove those and put them into a resource file. Has anybody else had this same problem with C++/CLI projects? If so, how are you managing string resources?
|
|
|
|
|
If you can outline the minimal steps to reproduce the problem, I can check if I get it too.
Regards,
Nish
|
|
|
|
|
I asked the same question on the MSDN forums and received a good suggestion to create a second resX file and placed localizable strings in there. I think I'm going to do that.
|
|
|
|
|
espeir wrote: I asked the same question on the MSDN forums and received a good suggestion to create a second resX file and placed localizable strings in there. I think I'm going to do that.
Ok, good luck with that
Regards,
Nish
|
|
|
|
|
Hi,
i've made a managed wrapper(Managed Extensions) for a class, that was written in C++ with VS 6.0.
It works very fine but here's my problem:
I'd like to debug code of my C++-class. Any searches with google led to nothing.
Hope here in this discussion board there are some people who can help me ?
My environments:
VC++ 6.0 which i compiled the dll (source is available)
VS++ 7.0 2003 2 project: 1 project defines a managed wrapper which delegates all methode-calls to
the aggregated C++-class.
Thanx in advance
Eddy
|
|
|
|
|
VC 2003 does support mixed-mode debugging, but it's slow and doesn't work well all the time. You could force a debugger break by using an __asm int 3
Regards,
Nish
|
|
|
|
|
hello nish's,
this is right and i can set this debug-property, but
it wouldn't work practically ? If i debug, it will not jump into
source-code of the dll-VC6.0 project.
Have i set another switch or something else ?
thanx
|
|
|
|