|
I think I'll need to do some wizard controls in the future to accommodate for the short-comings of certain users.
I'd need something that supports some databinding, or at least makes it simple to perform databinding actions myself. I did a quick search on CP and found a good deal of Wizard controls, most of them somewhat dated.
Does anyone have any suggestions for a wizard control that's flexible and easy to implement? Any that are packed with features but a pain to implement?
|
|
|
|
|
Sounds like a candidate for an article. Why not write one of your own, and share it with us, especially as you get to define the features you feel you need? If you have specific problems, or just want advice on features, we'll be glad to help. I look forward to seeing this article.
|
|
|
|
|
Indeed, a great article idea. If people wouldn't mind my writing style (that tends to get off topic and so interjected that it reminds me of a heavily nested, maybe a recursive algorithm) and vocabulary, or lack thereof. And don't get me started on tangents... which reminds me of one of my calculus profs for some reason. He always stopped to talk about his statistician friend who counts insects in the woods and looks like a sasquatch... anyway, that sounds like a great idea.
But I'm not sure if I have time to re-invent the wheel. Which is why I wanted to know what people liked to use.
Now that you got me thinking about it though, I'm getting some design thoughts running through my head. It'd be a fun project to do in my off time after I finish my wife's joint story authoring web-app (she's writing a story in conjunction with her friends and one of them is going crazy with her character so she asked me to make something that forced a kind of co-author approval before it can be appended to the main story). My only problem would be coding for the designer. It's not something I've done before. Fortunately, I've got a lot of sample code to go off of and a great community on CP.
|
|
|
|
|
Sounds good. I'm really looking forward to it now though.
|
|
|
|
|
I'm implementing the XmlSchemaProvider attribute and am having some issues defining my XSD. I've created a XSD file which will be an embedded resource in an assembly. I'm attempting to import the MS WSDL types schema so that I can provide a defintion for char datatype, but every way I try and add the namespace and import the schema I get resolution errors. I'm VERY new to XSDs and have some working knowledge of XML so I'm not 100% positive I can do what I want to here, but this is the basic pattern I have seen in many WSDLs for adding support for char datatypes.
I posted this question in the XML message board as well, but was hoping some C#ers out there have come across this same issue while implementing the XmlSchemaProvider attribute.
Any answers or shoves in the right direction would be appreciated.
Below is a sample format for my XSD:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema targetNamespace="http://tempuri.org/XMLSchema.xsd"
elementFormDefault="qualified"
xmlns="http://tempuri.org/XMLSchema.xsd"
xmlns:mstns="http://tempuri.org/XMLSchema.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xs0="http://microsoft.com/wsdl/types/"
>
<xs:import namespace="http://microsoft.com/wsdl/types/"/> <!--cannot resolve "http://microsoft.com/wsdl/types/" error here-->
<xs:complexType name="MyComplexType">
<xs:sequence>
<xs:element name="Value" nillable="true">
<xs:complexType>
<xs:choice>
<xs:element name="boolean" type="xs:boolean" />
<xs:element name="byte" type="xs:byte" />
<xs:element name="unsignedByte" type="xs:unsignedByte" />
<xs:element name="short" type="xs:short" />
<xs:element name="unsignedShort" type="xs:unsignedShort" />
<xs:element name="int" type="xs:int" />
<xs:element name="unsignedInt" type="xs:unsignedInt" />
<xs:element name="long" type="xs:long" />
<xs:element name="unsignedLong" type="xs:unsignedLong" />
<xs:element name="float" type="xs:float" />
<xs:element name="double" type="xs:double" />
<xs:element name="decimal" type="xs:decimal" />
<xs:element name="dateTime" type="xs:dateTime" />
<xs:element name="string" type="xs:string" />
<xs:element name="char" type="xs0:char" /> <!--Type http:=
</xs:choice>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>
|
|
|
|
|
I write a windows service. This program copy file to another location. Program is properly working in on local disk. If I want to copy file between cliend and server i get error: ERROR 5 (0x00000005) Accessing Source Directory \\server\sharedFolder\ Access is denied.
Same code properly working on windows application, but not work in windows service application. I think this problem related about account permission. Windows application use current user name and password, but maybe windows service application use different account information. What can I do?
|
|
|
|
|
|
I use this code for Impersonate
private const int LOGON_TYPE_INTERACTIVE = 2;
private const int LOGON_TYPE_PROVIDER_DEFAULT = 0;
[DllImport("advapi32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
static public extern bool LogonUser(string userName, string domain, string passWord, int logonType, int logonProvider, ref IntPtr accessToken);
IntPtr accessToken = IntPtr.Zero;
LogonUser("boran", "IZON\boran", "96587", LOGON_TYPE_INTERACTIVE, LOGON_TYPE_PROVIDER_DEFAULT, ref accessToken);
WindowsIdentity identity = new WindowsIdentity(accessToken);
WindowsImpersonationContext context = identity.Impersonate();
Ok service is running, but I can't stop this service. And not work properly.
|
|
|
|
|
Probably your service is running under the system account which usually has no network rights. Either you give the system account the access rights needed (not recommended because then any other service or virus running under the system account will be able to fiddle with the network), or you use impersonation as Marc suggested, or you create a user account with exactly the rights needed and install your service to run under this very user account. I seem to recall that when deploying your service with msi you can create this user on the target machine as well.
|
|
|
|
|
I solve my proplem.
right click to my computer --> select manage --> select Services
after that select my service --> right click and select properties
click LogOn tab --> select "This Account" --> write my user name with .\ operators. For example my user name is boran and I type .\boran and type my password. Thats it, its work...
|
|
|
|
|
hello, I need to control the loudspeakers... I need to send frequencies (Hertz) to the loudspeakers and they need to broadcast it
hope you understand what I want to do
is it possible?
thanks
|
|
|
|
|
|
actually it's not wav files,.. I need to find a way to control the frequency - the amount of Hertz
|
|
|
|
|
|
Hi,
Not sure how accurate the duration would be, I wrote an article on timer accuracy,
and your message makes me consider adding a Console.Beep duration test to it!
|
|
|
|
|
I would love to see the article ![Smile | :)](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
Then go ahead and read it. The link is near.
|
|
|
|
|
thank you!
who would have thought that a simple console.beep would do the charm? ![Smile | :)](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
is it possible to send 1 console.beep to one loudspeaker and another to the second loudspeaker?
|
|
|
|
|
I have an unmanaged dll and I'm trying to make a wrapper around it so it can be used in a multiple projects. I have most of the functions working accept 1 and i can't seem to figure it out.
From the pdf the signature is as follows:
ic_subcall (sub_name, sub_name_len, code, num_args, var_args...)
In the documentation, the last argument is similar to params in C# and it takes type "ICSTRING".
typedef struct icstring {
long len;
unsigned char * text;
} ICSTRING;
And here is the method signature in the header file:
void FAR ic_subcall ic_proto((LPSTR, LPLONG, LPLONG, LPLONG, ...));
This is how i have my struct setup in C#. Here i am using a byte[] because i found (somewhere) that it is the equivelant to an unsighed char.
[StructLayout(LayoutKind.Sequential)]
internal struct icstring
{
public long len;
public byte[] text;
}
And finally, here is where i using the DLLImport
[DllImport("uvic32.dll", SetLastError = true)]
private static extern void ic_subcall(string sub_name, long sub_name_len, ref long code, long num_args, params icstring[] var_args);
When i make the call it throws an exception "Attempted to read protected memory....". I can't seem to figure out what is wrong. I'm not sure if it is the params keyword or if my struct is messed up somehow. Could someone point me in the right direction?
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
Hi,
AFAIK varargs cannot be passed from managed to unmanaged worlds, that is without
the managed world investigating all the arguments and Marshaling them explicitly
one by one.
|
|
|
|
|
Hey Luc!
Thats not good news!
I did a search on DLLImport & varargs and i was able to find someonthing HERE[^].
Right above the examples it explains the enum types. I found
Cdecl -- The caller cleans the stack. This enables calling functions with varargs,
which makes it appropriate to use for methods that accept a variable number of parameters, such as Printf.
I see in the example how they are using it in the printf. Do you think if i was to change my signature to
private static extern void ic_subcall(string sub_name, long sub_name_len, ref long code, long num_args, icstring var_args1, icstring var_args2, ..., ...);
and used the calling convention documented that i would work?
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
OK, I never tried it this way. I keep my P/Invoke stuff always as simple as possible.
Seems like maintaining stack will not be a problem, but I am still very worried
about marshaling types. Of course, simple value types (int, double, ...) and
strings will probably just work fine, but what about structures, class objects, etc?
|
|
|
|
|
I tried it and it still didn't work. But i think your right, i think its the struct that is messing it up. Thanks anyways for the help!
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
teejayem wrote: I have an unmanaged dll and I'm trying to make a wrapper around it so it can be used in a multiple projects.
In my experience creating a managed wrapper for native code is far simpler using C++/CLI than trying to do it in C#.
led mike
|
|
|
|