473,320 Members | 2,024 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

NetRemoteTOD sample in VB.NET

Hello I found the following example on another newsgroup:
is there any sample for NetRemoteTOD API function in C#?


[DllImport("netapi32.dll", CharSet=CharSet.Unicode)]
static extern uint NetRemoteTOD(string UncServerName, out IntPtr
BufferPtr);

[DllImport("netapi32.dll")]
static extern uint NetApiBufferFree(IntPtr Buffer);

struct TIME_OF_DAY_INFO
{
public uint tod_elapsedt, tod_msecs, tod_hours,
tod_mins, tod_secs, tod_hunds;
public int tod_timezone;
public uint tod_tinterval, tod_day, tod_month,
tod_year, tod_weekday;
}

--

IntPtr ptodi;
NetRemoteTOD( @"\\server", out ptodi );
TIME_OF_DAY_INFO todi = (TIME_OF_DAY_INFO)Marshal.PtrToStructure(
ptodi, typeof(TIME_OF_DAY_INFO) );
NetApiBufferFree( ptodi );

I was wondering if anyone had a sample on how to use NetRemoteTOD in VB.Net.

Thanks,
Adiel
Nov 20 '05 #1
1 4186
I found no information on the internet on how to accomplish this in
vb.net so I went ahead and published an article on how I got this to
work:

http://www.codeproject.com/vb/net/NetRemoteTOD.asp

Thanks,
Adiel
Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Alexandre | last post by:
Hi, Im a newb to dev and python... my first sefl assigned mission was to read a pickled file containing a list with DB like data and convert this to MySQL... So i wrote my first module which...
0
by: Ravindra | last post by:
Well I installed the framework provided by microsoft , the problem is I am able to activate the smart tag in the doc file but when I Click on the Show Detils option in the information bridge the...
5
by: Ale | last post by:
Ciao a tutti. Ho eliminato il database di esempio SAMPLE(non cancellato). Ora lo voglio reinstallare ma durante l'installazione mi da il seguente errore: nella finestra con scritto SQL1005N c'è...
1
by: Eliezer Figueroa | last post by:
Full Database System Sample? I want to know if there any good windows forms based database sample application that can be downloaded.I searched the MS site but most of the database samples are...
1
by: PRM | last post by:
Hi, I am tring to use the NetRemoteTOD Windows API from CSharp, I am looking for some help on the C# Signature for this API. An example of the Signature or USage in C# would be of great help. ...
0
by: Ray Tayek | last post by:
hi, getting a: .\Stdafx.cpp : fatal error C1192: #using failed on 'i: nunit\samples\cpp-sample"' 'The filename, directory name, or volume label syntax is incorrect.' nunit is installed in...
6
by: zhif | last post by:
I installed IBM DB2 Database for Window (Ver. 9) before. Meanwhile, I installed the database SAMPLE. Because I forgot my password, I uninstalled later on. Several days ago, I reinstalled again....
5
by: Otto Wyss | last post by:
I've now been looking for a week for a simple but useful sample on how to get a list of entries (persons) via an XMLHttpRequest using Json/PHP on the server. So far I've found about a thousend...
69
by: raylopez99 | last post by:
They usually don't teach you in most textbooks I've seen that delegates can be used to call class methods from classes that are 'unaware' of the delegate, so long as the class has the same...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.