|
Thats what I figured, but if you go down to pinvoke.net thats where it is. So somethings wrong.
My current favourite word is: Nipple!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
Try this method instead:
private byte[] GetDeviceID(string AppString)
{
byte[] AppData = Encoding.Unicode.GetBytes(AppString);
int appDataSize = AppData.Length;
byte[] DeviceOutput = new byte[20];
uint SizeOut = 20;
GetDeviceUniqueID(AppData, appDataSize, 1, DeviceOutput, out SizeOut);
return DeviceOutput;
}
byte[] id = GetDeviceId("myAppName");
|
|
|
|
|
Oh - you should also declare the function like this:
[DllImport("coredll.dll")]
private extern static int GetDeviceUniqueID([In, Out] byte[] appdata,
int cbApplictionData,
int dwDeviceIDVersion,
[In, Out] byte[] deviceIDOuput,
out uint pcbDeviceIDOutput);
|
|
|
|
|
Hi. I've got a windows service that uses classes defined in it. Only thing is the dev environment does not pic the classes up. They are there but I get the following.
Error The type or namespace name 'clsUploadToMoss' could not be found (are you missing a using directive or an assembly reference?)
Can someone tell me why this is happening?
Stephen Lintott Bsc IT (RAU)
|
|
|
|
|
As the compiler error indicates, are you missing a using; directive or an assembly reference?
/ravi
|
|
|
|
|
Thats what I don't get. The Classes are in the same namespace(project) as where I'm calling them from. Is there a setting I am missing or something like that?
Stephen Lintott Bsc IT (RAU)
|
|
|
|
|
This might be a dumb question, but did you perhaps forget to add the source files to the project?
/ravi
|
|
|
|
|
No they are there.
Stephen Lintott Bsc IT (RAU)
|
|
|
|
|
If you want, send me a .zip of your project if you'd like me to figure out what's going on.
/ravi
|
|
|
|
|
When you use a web service, you don't have access to any of the classes defined in the web service.
You only have data container classes that resembles the objects that the web service methods uses. Those "ghost" classes are created in the code that is generated to interface with the web service.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Guffa wrote: Those "ghost" classes
Or more commonly known as "proxy" classes
|
|
|
|
|
So I can't use the classes???
Stephen Lintott Bsc IT (RAU)
|
|
|
|
|
Not unless they are exposed via the web service, but those arent the real classes either. Maybe you should look at Remoting if you want to use those classes over the 'wire'.
|
|
|
|
|
He said "windows" service, not "web" service.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: He said "windows" service, not "web" service.
So he did.
Sorry, I read it as "web service", and the problem seemed to fit a web service also...
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Make sure the classes are "public". When you add a new class, it's not automatically public.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
make sure that the class constructor's access modifier is public.
or make sure one other thing that the classes namespace matches with the service namespace
|
|
|
|
|
check your 'clsUploadToMoss' class visibility(internal, public or private), and where you call your class
dhaim
programming is a hobby that make some money as side effect
|
|
|
|
|
READ THE ENTIRE THREAD. This suggestion was made almost 5-1/2 hours ago.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
sorry for my mistake
dhaim
programming is a hobby that make some money as side effect
|
|
|
|
|
Hi
I have used an ErrorProvider in my form, and it works truly, but when I run my project, after fixing the error of the textbox input, the errorprovider icon still exists and blinking. how the error icon disappears after fixing the error?
|
|
|
|
|
you have to clear the Error String via SetError:
errProvider.SetError (this, "");
|
|
|
|
|
Well, to clarify further, you would re-verify the validity of the field, and if it was ok then you would "SetError" to ""
|
|
|
|
|
Dear all,
I have compressed files in a SharePoint Library through a SharePoint's Feature into another Library. Say the name of the first library is "My Document Store" and the library where the feature stores the documents after compressing is "Compressed Document Store". The feature runs after a specific time. Now the feature is working fine, I am using "System.IO.Compression" library to compress the documents. Secondly, i have made a webpart, which displays the compressed document list. What i want to do is when a user clicks on a compressed document, the document should be uncompressed on the fly and should become downloadable to the user. But the point where i am stuck is, when i try to decompress the document, i.e,
use
any
stream
GZipStream zip = new GZipStream(fs, CompressionMode.Decompress, true);
int fileSize = zip.Read(buffer, 0, (int)buffer.Length);
zip.Write(buffer, 0, (int)buffer.Length);
zip.Flush();
I get the error : Writing to the compression stream is not supported.
What should i do now ?
This code is in the aspx file, the file can be seen here.http://www.drivehq.com/file/df.aspx/publish/Tamour/wwwhome/do.aspx[^]
note: The name of the file clicked is passed as parameter to do.aspx.
i have read the following forum http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=235208&SiteID=1[^]
Note: Features in SharePoint are actually the services like services in windows.
thanx in advance,
please help me,
im stuck in my project.
|
|
|
|
|
tamour wrote: GZipStream zip = new GZipStream(fs, CompressionMode.Decompress, true);
How can you decompress and write at the same time? You need to compress.
|
|
|
|